error_22
11-06-2006, 08:12 PM
Hello!
I have a question about error reporting (if thats what its called).
Lets say I have a form:
<form action="save.php" method="post">
<input type="text" name="hello" />
<input type="submit" value="save" />
</form>
The value from the hello field is then sent to save.php where a script checks if that value already exists. if it does, then I want save.php to send the visitor back to the html form. i want there to be an error message (your name is already taken) and the value you put in should be displayed in the input field.
Is there an easy way to achieve this?
Thanks in advance
Niklas
I have a question about error reporting (if thats what its called).
Lets say I have a form:
<form action="save.php" method="post">
<input type="text" name="hello" />
<input type="submit" value="save" />
</form>
The value from the hello field is then sent to save.php where a script checks if that value already exists. if it does, then I want save.php to send the visitor back to the html form. i want there to be an error message (your name is already taken) and the value you put in should be displayed in the input field.
Is there an easy way to achieve this?
Thanks in advance
Niklas