2wasted Posted October 3, 2006 Share Posted October 3, 2006 lo all,i would like when my form is submitted it went 2 a thank you page, is this easy?thxCharlie Quote Link to comment https://forums.phpfreaks.com/topic/22922-thank-you-page-after-form/ Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Share Posted October 3, 2006 yes.Show your code Quote Link to comment https://forums.phpfreaks.com/topic/22922-thank-you-page-after-form/#findComment-103408 Share on other sites More sharing options...
2wasted Posted October 3, 2006 Author Share Posted October 3, 2006 here ya go:-) <input name="submit" type="Submit" onclick="MM_validateForm('email','','RisEmail');return document.MM_returnValue" value="Enter information" /> </label></td> <td> </td> <?PHP $Name=$_POST['name'];$Cname=$_POST['cname'];$Query=$_POST['Question'];$email=$_POST['email']; mysql_select_db($database_csc, $csc);$query_Recordset1 = "SELECT * FROM onlineform";$Recordset1 = mysql_query($query_Recordset1, $csc) or die(mysql_error());$row_Recordset1 = mysql_fetch_assoc($Recordset1);$totalRows_Recordset1 = mysql_num_rows($Recordset1);$query_Recordset1 or die( "Unable to select database");$query = "INSERT INTO onlineform VALUES ('','$name','$Cname','$email','$Query')";mysql_query($query);mysql_close();?> Quote Link to comment https://forums.phpfreaks.com/topic/22922-thank-you-page-after-form/#findComment-103437 Share on other sites More sharing options...
Ninjakreborn Posted October 3, 2006 Share Posted October 3, 2006 [code]<input name="submit" type="Submit" onclick="MM_validateForm('email','','RisEmail');return document.MM_returnValue" value="Enter information" /> </label></td> <td> </td><?php$Name=$_POST['name'];$Cname=$_POST['cname'];$Query=$_POST['Question'];$email=$_POST['email']; mysql_select_db($database_csc, $csc);$query_Recordset1 = "SELECT * FROM onlineform";$Recordset1 = mysql_query($query_Recordset1, $csc) or die(mysql_error());$row_Recordset1 = mysql_fetch_assoc($Recordset1);$totalRows_Recordset1 = mysql_num_rows($Recordset1);$query_Recordset1 or die( "Unable to select database");$query = "INSERT INTO onlineform VALUES ('','$name','$Cname','$email','$Query')";if (mysql_query($query)) {echo "Thank you for signing up"; // or whatever other message in between the quotes}else {echo "I apologize there was a problem with signup"; // or whatever message here}mysql_close();?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/22922-thank-you-page-after-form/#findComment-103439 Share on other sites More sharing options...
2wasted Posted October 3, 2006 Author Share Posted October 3, 2006 thx m8 Quote Link to comment https://forums.phpfreaks.com/topic/22922-thank-you-page-after-form/#findComment-103458 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.