#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    2
    Rep Power
    0
    Hi, I read a while back about setting the action to a form as "$php_self" or something similar, and then each time that form was submitted, it would call the page that it came from to process the data.

    Then before any output, you put an If ($submit) statement so the page knows to process information if it recieves any.

    I want to have a form in an include file, and use the "$php_self" so that upon submitting the form the browser calls that page again.

    What is the format for setting the fom action="?????" I can't remember it, and I can't find the page where I saw it.

    Thanks

    ------------------
    Matt Clark
    Wine Scout - For the Love of Wine
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    hi luisc,

    you can simply use "<form action="<? print $PHP_SELF ?>" method="post">

    i think it will work with include files as well


    ------------------
    SR -
    shiju.dreamcenter.net
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    2
    Rep Power
    0
    Thanks for getting back to me. It works great now. Even with that form in an include file, the $PHP_SELF variable is address for the top page that called the include file.

    ------------------
    Matt Clark
    Wine Scout - For the Love of Wine

Similar Threads

  1. Avoid form resubmission when REFRESH clicked
    By rahulgup in forum ASP Programming
    Replies: 0
    Last Post: February 5th, 2004, 01:21 PM
  2. HTTP Error 400: Bad Request, with basic form
    By crackwombat in forum PHP Development
    Replies: 1
    Last Post: January 23rd, 2004, 06:40 PM
  3. sending form field data
    By bellcom in forum PHP Development
    Replies: 1
    Last Post: January 19th, 2004, 03:39 PM
  4. form creation using php
    By emzyme in forum PHP Development
    Replies: 4
    Last Post: January 15th, 2004, 06:23 AM
  5. access 2000 - problem with making a form a pop-up
    By ironchef in forum Database Management
    Replies: 0
    Last Post: December 15th, 2003, 10:48 AM

IMN logo majestic logo threadwatch logo seochat tools logo