1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP and HTTP POST???

Discussion in 'PHP' started by Vincent_Wiebe, Oct 20, 2007.

  1. #1
    I am currently working on a website that will allow a program to Post a HTTP Page on it.. But i have no clue how to do this. any help would be greatly appriciated, Thanks
     
    Vincent_Wiebe, Oct 20, 2007 IP
  2. Lordy

    Lordy Peon

    Messages:
    1,643
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    can you elaborate?
     
    Lordy, Oct 20, 2007 IP
  3. Vincent_Wiebe

    Vincent_Wiebe Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hmm... Ok well i made a program, that is able to set certain variables to something.
    Ex) $var = "Variable"

    But i'm not sure how to make it so that the webpage will allow these changes to be made. I pretty much need the program to temporarly be able to change parts of the scripting on the site.
     
    Vincent_Wiebe, Oct 20, 2007 IP
  4. Vincent_Wiebe

    Vincent_Wiebe Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Figured it out, thanks everyone
     
    Vincent_Wiebe, Oct 20, 2007 IP
  5. phpl33t

    phpl33t Banned

    Messages:
    456
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Pick up "php for dummies", not that you are a dummy, but it is a great starter book. I read it nearly a decade ago and it set the pace for a great career.... but afterwards you need to upgrade to cookbooks and such to further your understanding of php.
     
    phpl33t, Oct 22, 2007 IP
    zerofunk likes this.
  6. Synchronium

    Synchronium Active Member

    Messages:
    463
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Since no explanation was given even though he figured it out, here's how it's done.

    First give your html input boxes a name attribute, for example: <input type="text" name="test" />

    When the form's submitted, you can get the variable with the $_POST array like so:

    $test = $_POST['test'];

    It's also worth noting, you should clean any inputted data with trim, mysql_real_escape_string etc.
     
    Synchronium, Oct 22, 2007 IP