Jai Rangi wrote:
Dear Chris,
Thank you for your response. I will make sure to start a new thread for
future.
I tried this but it did not work
if (isset($_POST['title'])) {
$title = htmlentities($_POST['title']);
echo $title;
} else {
$title = '';
}
This part of my code seems to be the problem, Though I dont know why.
if (isset($message))
{
echo "<font color=\"red\">{$message} </font><br>";
echo "You are logged in $user";
?>
Cause if change the if statement to
if (!isset($message))
the values are saved. But I need this to display the message..
if (empty($title) || empty($Email) || empty($Phone) || empty($Details)
|| empty($Keywords) || empty($City))
{
$message = "Please fill all the required fields.";
// Now, redirect the browser to the current page
session_start();
header("Location: form.php?message=" . urlencode($message));
exit;
}
Here is my structure..
<?php
//check is there is any message, which I expect to have when the user
come on this page. Then show the user form
if (isset($message))
{
If it's in the url, it should be $_GET['message'] - something like this:
if (isset($_GET['message'])) {
echo htmlentities($_GET['message']);
}
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php