Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have a simple html form that collects contact details and fires them at a basic php script which put them into a data base using the code below.
When the users have successfully entered their details they get a thankyou message telling them so. It says "Thanks a lot - Your contact info has been sent"
What I'm trying to work out is how I can also include a link in that message that says 'click here to go back to the main site'
I have tried including a link in the usual html way but that messes things up totally!
Any help would be greatly appreciated thanks
m
this is my current php script ..Code: Select all
<?php
$dbhost = "***.*.*.*";
$dbusername = "*****";
$dbpw = "******";
$dbname = "*******_com_-_contact";
$postvars = array("SurName", "Postcode","HeardAbout","Gender","Age","Email");
foreach ($postvars as $var)
if(isset($_POST[$var]))
$$var = $_POST[$var];
$connection = mysql_connect($dbhost, $dbusername, $dbpw) or die(mysql_error());
mysql_select_db($dbname, $connection);
$query = "INSERT INTO `jamesfoxall` VALUES ( '$SurName','$Postcode','$HeardAbout','$Gender','$Age','$Email');";
mysql_query($query, $connection) or die(mysql_error());
mysql_close($connection);
Print "Thanks a lot - Your contact info has been sent";
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]