SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Threaded View

  1. #1
    SitePoint Member
    Join Date
    May 2002
    0 Post(s)
    0 Thread(s)

    header location not working?

    My first post! Need a little help on a very simple script.
    PHP Code:

    $user "blah";
    $database "blahblah";

    $id mysql_connect($host,$user);

    //while (list ($key, $val) = each ($HTTP_POST_VARS)) {
    //    echo "<br>$key: $val";


    $sql "INSERT INTO calender(ID,title,startDate,endDate,description,address,city,state,zip,phone,email,web) VALUES('','$title','$startDate','$endDate','$description','$address','$city','$state','$zip','$phone','$email','$web')";
    $result mysql_query($sql);

    Header("Location: view.php");

    The above code does NOT forward to view.php after everything else is finished. Doesn't return an error - doesn't do anything. Just stays on the current (blank) page.

    Also, is there a better way to assign values to each of my post vars?
    If I don't declare them like this:
    then I can't refer to them by name. Example, I can't use the variable $web unless I declare it as above -- even though it was passed as a post var with the name of web already?


    Thanks everyone

    EDIT: I'm using "Small HTTP Server" and PHP 4 on windows 98, if that helps.
    Last edited by phpGrasshopper; May 9, 2002 at 13:24.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts