Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 659645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:04:04+00:00 2026-05-13T23:04:04+00:00

i have a dialog box that opens on pageload for a site. script type=text/javascript>

  • 0

i have a dialog box that opens on pageload for a site.

script type="text/javascript">
$(function() {
    $('#dialog-message').dialog({
        modal: 'true',
        width: '400'
    });
});

</script>

this pulls up an include:

<div id="dialog-message" title="Free Jiu Jitsu Session at Alliance">
          <!--#include virtual="/includes/guest.php" -->

guest.php has a very small form that is processed by the page itself:

    <?php
$dbh=mysql_connect //login stuff here       
                if (isset($_POST['submit'])) { 

                if (!$_POST['name'] | !$_POST['email']) 
                {
                echo"<div class='error'>Error<br />Please provide your Name and Email Address so we may properly contact you.</div>";
                }
                else
                {
                $age = $_POST['age'];   
                $name = $_POST['name'];
                $gender = $_POST['gender'];
                $email = $_POST['email'];
                $phone = $_POST['phone'];
                $comments = $_POST['comments'];

                $query = "INSERT INTO table here (age,name,gender,email,phone,comments)
                VALUES ('$age','$name','$gender','$email','$phone','$comments')";

                mysql_query($query);

                mysql_close();

                $yoursite = "my site here";
                $youremail = $email;

                $subject = "Website Guest Contact Us Form";
                $message = "message here";

                $email2 = "send to email address";

                mail($email2, $subject, $message, "From: $email");

                echo"<div class='thankyou'>Thank you for contacting us,<br /> we will respond as soon as we can.</div>";

                }
                }
                ?>

                <form id="contact_us" class="guest" method="post" action="/guest.php" >
                    <fieldset>
                        <legend>Personal Info</legend>
                            <label for="name" class="guest">Name:</label>
                            <input type="text" name="name" id="name" value="" /><br>

                            <label for="phone" class="guest">Phone:</label>
                            <input type="text" name="phone" id="phone" value="" /><br>

                            <label for="email" class="guest">Email Address:</label>
                            <input type="text" name="email" id="email" value="" /><br>

                            <label for="age" class="guest">Age:</label>
                            <input type="text" name="age" id="age" value="" size="2" /><br>

                            <label for="gender" class="guest">Sex:</label>
                            <input type="radio" name="gender" value="male" /> Male
                            <input type="radio" name="gender" value="female" /> Female<br />
                    </fieldset>

                    <fieldset>
                       <legend>Comments</legend>     

                            <label for="comments" class="guest">Comments / Questions:</label>
                            <textarea id="comments" name="comments" rows="4" cols="22"></textarea><br>

                            <input type="submit" value="Submit" name="submit" /> <input type="Reset" value="Reset" />

                    </fieldset> 
                </form>

Problem is, that the path of the form action does not work, becasue this dialog box is on the index.html page of the site, and if i put the absolute path, it doesnt process…

i have this functioning on another contact us page, so i know it works, but wit the dialog box, it seems to have stumped me…

what should i do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:04:05+00:00Added an answer on May 13, 2026 at 11:04 pm

    I think your best (simplest) bet is actually to post the form to a wrapper page (thanks.php or what have you) which in turn includes the guest.php code.

    The way you’ve got it now, you’ll post your results to the include/guest.php file, which has no apparent HTML dressing around it. It sounds like you may expect the result to load into the dialog box in some AJAX-y manner?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 375k
  • Answers 375k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I don't think that its possible. But you could separate… May 14, 2026 at 8:11 pm
  • Editorial Team
    Editorial Team added an answer Answered here, but that answer was mysql specific in the… May 14, 2026 at 8:11 pm
  • Editorial Team
    Editorial Team added an answer Effectively, it seems that they reinvented the wheel (so to… May 14, 2026 at 8:11 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.