Jump to content

Archived

This topic is now archived and is closed to further replies.

2wasted

thank you page after form

Recommended Posts

lo all,
i would like when my form is submitted it went 2 a thank you page, is this easy?
thx
Charlie

Share this post


Link to post
Share on other sites
here ya go:-) 
<input name="submit" type="Submit" onclick="MM_validateForm('email','','RisEmail');return document.MM_returnValue" value="Enter information" />
    </label></td>
    <td>&nbsp;</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();

?>

Share this post


Link to post
Share on other sites
[code]<input name="submit" type="Submit" onclick="MM_validateForm('email','','RisEmail');return document.MM_returnValue" value="Enter information" />
    </label></td>
    <td>&nbsp;</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]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.