how to put record added in new page

hello currently my code reads like this

if (!isset($_POST[‘submit’])) {
echo’<leftmargin=“0” topmargin=“0” rightmargin=“0” bottommargin=“0”>

Event Name
Event Address
Event City
Event County
Event State
Event Country
Event Opening Date
Event Closing Date
Event Contact Email
Event Website

//note that I added a new field called submit and it’s hidden …
} else {

/*I added addslashes() so it escape any special char in the form ..
if you want to show your inserted record , you need to use stripslashes() to remove any slashes from the record ..
this is only to avoid some security problems in the query ..*/


$link = mysql_connect($hostname_local,$username_local, $password_local)
or die(“Could not connect”);
or die(“Could not select database”);

$insert=mysql_query("INSERT INTO events (fairidnum, fairname, fairadd, faircity, faircty, fairstate, fairctry, fairopen, fairclose, fairmail, fairweb)
VALUES('NULL', '$fairname', '$fairadd', '$faircity', '$faircty','$fairstate', '$fairctry','$fairopen', '$fairclose', '$fairmail', '$fairweb')")or
die('couldn\'t Insert record into database :'.mysql_error());

echo'The Record was inserted succesfully into Database';

If you notice the last few lines says echo'The Record was inserted succesfully into Database';

I would like that to display on a seperate page that has the rest of not sure if template is the right word for it but so it shows on a page similar to the rest of my pages meaning has my header and my links.

Would I just make a new page and remove the echo entry and use include statement? or what?

Sponsor our Newsletter | Privacy Policy | Terms of Service