Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Using Advanced DHTML Popup / Form In pop up / submit action
Old 11-20-2009, 05:00 PM Using Advanced DHTML Popup / Form In pop up / submit action
Junior Talker

Posts: 1
Trades: 0
Advanced DHTML Popup

http://www.dpopup.com/dhtml-popup-examples.html

I am using there pop up script to display a form , very similar to what they have on the page above where it pops up on the bottom.

When I submit the form I want it to post the data to the DB but also stay on that same window and say thank you , blah blah you can now close this window.

But its not going that, How can I do it how they have it on their thing ? where when you hit submit it loads on that same pop up window.

PS. I also tried to close on submit but that does not work

Thanks for the help

HTML Code:
<form method="post" action="register2.php" onsubmit="top.close();">
  Name<br/><input type="text" name="name" maxlength="20" /><br/>
  Email<br/><input type="text" name="email" /><br/>
  <input name="submit" input type="submit" value="Submit Me" />
</form>

My PHP

PHP Code:
<?PHP   
// register2.php  
include("dbconnect.php");  
$errors "";  
if (!isset(
$_POST['name']))  
$errors .= "Please provide your name. <br/>";  
if (!isset(
$_POST['email']))  
$errors .= "Please provide an email address. <br/>";  
if (
$errors == "") {  
mysql_query("INSERT INTO user_list VALUES(  
'',  
'"
.addslashes($_POST['name'])."',  
'"
.addslashes($_POST['email'])."',  
'"
.time()."'  
)"
) or die(mysql_error());  
echo 
"Registration Successful!";  
} else {  
echo 
$errors."Please go back and try again.";  
}  
?>
csads is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-24-2009, 04:59 AM Re: Using Advanced DHTML Popup / Form In pop up / submit action
Super Talker

Posts: 139
Name: John Davis
Trades: 0
I'm not sure I've understood you, but try to use target="_parent" in your form
Code:
<form method="post" action="register2.php" onsubmit="top.close();" target="_parent">
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Reply     « Reply to Using Advanced DHTML Popup / Form In pop up / submit action
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19486 seconds with 12 queries