Re: PHP Form Help

From: Date: Thu, 06 Apr 2006 05:38:36 +0000
Subject: Re: PHP Form Help
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-233334@lists.php.net to get a copy of this message
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/

« previous php.general (#233334) next »