![]() | | ||||||||
| | #1 |
| dream maker Join Date: Dec 2010 Location: hang zhou
Posts: 70
Thanks: 19
Thanked 2 Times in 2 Posts
|
it's a email submit landingpage,but i don't know how to do to solve the problem that when you click the submit button,there is no reaction. ![]() i am really poor at php.I think there should be a php page to link to a mysql database.So i did it. But what next?I need some help. UPDATE: The problem is ok. New problem is the index.php when i upload my site to my host. when i open its url it shows as below. Warning: mysql_pconnect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /hsphere/local/home/c317354/1keywordsfinder.com/freevacationoffer/Connections/freevacation.php on line 9 Fatal error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /hsphere/local/home/c317354/1keywordsfinder.com/freevacationoffer/Connections/freevacation.php on line 9 what is this? [IMG]chrome://livemargins/skin/monitor-background-horizontal.png[/IMG] [IMG]chrome://livemargins/skin/monitor-background-vertical.png[/IMG] [IMG]chrome://livemargins/skin/monitor-play-button.png[/IMG][IMG]chrome://livemargins/skin/monitor-background-horizontal.png[/IMG] [IMG]chrome://livemargins/skin/monitor-background-vertical.png[/IMG] [IMG]chrome://livemargins/skin/monitor-play-button.png[/IMG] |
| | |
| | #2 |
| Warrior Member Join Date: Nov 2010
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
|
Take a look here Creating a registration form using PHP is the same , only create registration page with email only ![]() Wish you the best. Cheers ! |
| | |
| | #3 |
| dream maker Join Date: Dec 2010 Location: hang zhou
Posts: 70
Thanks: 19
Thanked 2 Times in 2 Posts
|
thank you earnnow2010,you're so kind. |
| | |
| | #4 |
| dream maker Join Date: Dec 2010 Location: hang zhou
Posts: 70
Thanks: 19
Thanked 2 Times in 2 Posts
|
I have seen it. But i just need a zipcode submit code.Its is too complex for me. Is there a simple way? Thanks a lot.
|
| | |
| | #5 |
| HQ Programmer Join Date: May 2011
Posts: 50
Thanks: 0
Thanked 2 Times in 2 Posts
|
Make a connection and continue with an INSERT TO..
|
|
BumbleBee at HackForums.
| |
| | |
| | #6 |
| Webmasters Join Date: Aug 2011 Location: Pakistan
Posts: 30
Thanks: 1
Thanked 1 Time in 1 Post
|
Don't mind if I use some simple code..... Here is your form code place it where you want...... <form name="Your Form Name" action="thank-you.php" method="post" onSubmit="return validate();"> <div id="form_" class="Don"><span class="txt_w"><b>For questions about an order or for information about our products leave us a message </b></span><br /> <br /> <table class="txt_w" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody> <tr height="32"> <td valign="top" width="100">Your Name:</td> <td valign="top"><input name="Name" id="Name" class="input" size="50" type="text" /></td> </tr> <tr height="32"> <td valign="top">Your E-mail:</td> <td valign="top"><input name="Email" id="Email" class="input" size="50" type="text" /></td> </tr> <tr height="32"> <td valign="top">Subject:</td> <td valign="top"><input name="Subject" id="Subject" class="input" size="50" type="text" /></td> </tr> <tr height="165"> <td valign="top">Message:</td> <td valign="top"><textarea name="Message" id="Message" cols="55" class="input" rows="8"></textarea></td> </tr> <tr height="45"> <td> </td> <td><input name="Submit" class="button" value=" Send Message " type="submit" /> <input name="Reset" class="button" value=" Reset Form " type="reset" /></td> </tr> </tbody> </table> </div> </form> Now remember to create your target page which is "thank_you.php" That's very easy you just have to provide your database info. in simple words...... |
| | |
| | |
| | #7 |
| dream maker Join Date: Dec 2010 Location: hang zhou
Posts: 70
Thanks: 19
Thanked 2 Times in 2 Posts
| Thanks smalt. Is it the code below? <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "zipform")) { $insertSQL = sprintf("INSERT INTO SCHEMA_PRIVILEGES (GRANTEE) VALUES (%s)", GetSQLValueString($_POST['zipcode'], "int")); mysql_select_db($database_freevacation, $freevacation); $Result1 = mysql_query($insertSQL, $freevacation) or die(mysql_error()); $insertGoTo = "privacypolicy.html"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } ?> |
| | |
| | #8 |
| dream maker Join Date: Dec 2010 Location: hang zhou
Posts: 70
Thanks: 19
Thanked 2 Times in 2 Posts
| I did the "insert to" but,when i click it shows "Access denied for user 'root'@'localhost' to database 'information_schema'" Do you what's that mean? Thank you again. ![]() [IMG]chrome://livemargins/skin/monitor-background-horizontal.png[/IMG] [IMG]chrome://livemargins/skin/monitor-background-vertical.png[/IMG] [IMG]chrome://livemargins/skin/monitor-play-button.png[/IMG] |
| Last edited by zlc000190; 08-16-2011 at 08:47 AM. Reason: code don't show | |
| | |
| | #9 |
| dream maker Join Date: Dec 2010 Location: hang zhou
Posts: 70
Thanks: 19
Thanked 2 Times in 2 Posts
|
The problem is ok. New problem is the config.php when i upload my site to my host. when i open its url it shows as below. Warning: require_once(.fg_freevacation.php): failed to open stream: No such file or directory in /hsphere/local/home/c317354/1keywordsfinder.com/freevacationoffer/freevacation_config.php on line 2 Fatal error: require_once(): Failed opening required '.fg_freevacation.php' (include_path='.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/c317354/1keywordsfinder.com/freevacationoffer/freevacation_config.php on line 2 [IMG]chrome://livemargins/skin/monitor-background-horizontal.png[/IMG] [IMG]chrome://livemargins/skin/monitor-background-vertical.png[/IMG] [IMG]chrome://livemargins/skin/monitor-play-button.png[/IMG] |
| | |
| | #10 | |
| Black Ninja Optimizer Join Date: Aug 2011 Location: Las Vegas
Posts: 96
Thanks: 1
Thanked 8 Times in 8 Posts
| Quote:
| |
| | ||
| | |
| | #11 |
| dream maker Join Date: Dec 2010 Location: hang zhou
Posts: 70
Thanks: 19
Thanked 2 Times in 2 Posts
|
onlinecasinodeck thanks. But i really can't comprehension it. [IMG]chrome://livemargins/skin/monitor-background-horizontal.png[/IMG] [IMG]chrome://livemargins/skin/monitor-background-vertical.png[/IMG] [IMG]chrome://livemargins/skin/monitor-play-button.png[/IMG] |
| | |
| | #12 |
| dream maker Join Date: Dec 2010 Location: hang zhou
Posts: 70
Thanks: 19
Thanked 2 Times in 2 Posts
| |
| | |
![]() |
|
| Tags |
| database, landingpage, made, mysql |
| Thread Tools | |
| |
![]() |