Hi,
I have an HTML page with a form where I have to enter a title among other things. When the user hits the Submit button, a PHP page is called where I first connect to a database to see if the title exists. If it does, I include the HTML page, but I also want to somehow set a variable to send back to the HTML page where I would check for that variable and if it's set I would output some error message like: "This title already exists. Please choose a different title."
Here's the PHP code:
//check for similar urltitle
$check = "select title from Item where title='$_POST[title]'";
$check_res = mysql_query($check, $conn) or die(mysql_error());
if (mysql_num_rows($check_res)){ include 'form.html'; exit;}
How can I send a variable to the form.html page? Or any other method?
Thanks.
Mike