Professional Web Applications Themes

How do I POST variables to a php script ON A LOCALSERVER - I AM PULLING MY HAIR OUT - PHP Development

Hi everyone and anyone I am running Apache2, Mysql and php on my P4. When I run a simple php script that inserts new data into a database everything works as expected, the data is added to the table that the php script points to. THE PROBLEM is when I have a simple form on a HTML page and try to POST the data in variables. The variables are NOT GETTING POSTED! The php script IS called but add blank (null) data to the table! Could someone please please help... I have NO IDEA what I am doing wrong. Infact ...

  1. #1

    Default How do I POST variables to a php script ON A LOCALSERVER - I AM PULLING MY HAIR OUT

    Hi everyone and anyone



    I am running Apache2, Mysql and php on my P4.

    When I run a simple php script that inserts new data into a database
    everything works as expected, the data is added to the table that the
    php script points to.

    THE PROBLEM is when I have a simple form on a HTML page and try to
    POST the data in variables.

    The variables are NOT GETTING POSTED! The php script IS called but
    add blank (null) data to the table!


    Could someone please please help... I have NO IDEA what I am doing
    wrong.

    Infact the problem is NOTHING to do with MYSQL but just how to POST
    variabel to a php script on a localserver.

    The exact problem is NOT a problem whe I load the php and html docs.
    to my ftp site on the web, so why doesn't it work on a localserver?

    TIA
    Portfar Guest

  2. #2

    Default Re: How do I POST variables to a php script ON A LOCALSERVER - I AM PULLING MY HAIR OUT

    On Tue, 11 Nov 2003 01:18:09 +0000, Portfar <portfarhotmail.com>
    wrote:
    >Hi everyone and anyone
    >
    >
    >
    I sorted it!


    I have answered my own problem and just incase anyone else was
    wondering or having a similar problem....


    in the php.ini I had to set the register_globals to ON, they where
    OFF! (AND THAT WAS IT)

    cool!

    Thanks still though!

    hope this helps someone else



    PF
    Portfar Guest

  3. #3

    Default Re: How do I POST variables to a php script ON A LOCALSERVER - I AM PULLING MY HAIR OUT

    Try not to use GLOBAL variables if you can, I have already gotten bitten by
    using them. Just some advice.


    "Portfar" <portfarhotmail.com> wrote in message
    news:8bf0rv0dgetn7so799u2c9ogqlsuqiu53m4ax.com...
    > On Tue, 11 Nov 2003 01:18:09 +0000, Portfar <portfarhotmail.com>
    > wrote:
    >
    > >Hi everyone and anyone
    > >
    > >
    > >
    > I sorted it!
    >
    >
    > I have answered my own problem and just incase anyone else was
    > wondering or having a similar problem....
    >
    >
    > in the php.ini I had to set the register_globals to ON, they where
    > OFF! (AND THAT WAS IT)
    >
    > cool!
    >
    > Thanks still though!
    >
    > hope this helps someone else
    >
    >
    >
    > PF

    Jamie Bohr Guest

  4. #4

    Default Re: How do I POST variables to a php script ON A LOCALSERVER - I AM PULLING MY HAIR OUT

    "Portfar" <portfarhotmail.com> wrote in message
    news:8bf0rv0dgetn7so799u2c9ogqlsuqiu53m4ax.com...
    > in the php.ini I had to set the register_globals to ON, they where
    > OFF! (AND THAT WAS IT)
    It's safer to use $_POST["<variableName>"] because this stops users
    overriding variables with their own forms.

    Alex.


    Alex Meaden Guest

  5. #5

    Default Re: How do I POST variables to a php script ON A LOCALSERVER - I AM PULLING MY HAIR OUT

    YUCK!!!!!!
    "Portfar" <portfarhotmail.com> wrote in message
    news:8bf0rv0dgetn7so799u2c9ogqlsuqiu53m4ax.com...
    > On Tue, 11 Nov 2003 01:18:09 +0000, Portfar <portfarhotmail.com>
    > wrote:
    >
    > >Hi everyone and anyone
    > >
    > >
    > >
    > I sorted it!
    >
    >
    > I have answered my own problem and just incase anyone else was
    > wondering or having a similar problem....
    >
    >
    > in the php.ini I had to set the register_globals to ON, they where
    > OFF! (AND THAT WAS IT)
    >
    > cool!
    >
    > Thanks still though!
    >
    > hope this helps someone else
    >
    >
    >
    > PF

    Michel Guest

Similar Threads

  1. 2004 preloading - pulling hair out, only one left
    By Syndicate5 in forum Macromedia Flash Actionscript
    Replies: 3
    Last Post: March 1st, 12:33 AM
  2. Pulling my hair out!! Text on a path??
    By jip in forum Macromedia Freehand
    Replies: 3
    Last Post: January 16th, 10:47 PM
  3. Replies: 3
    Last Post: November 12th, 11:36 AM
  4. NET::HTTP, LWP and XML - pulling my hair out!!!
    By north in forum PERL Modules
    Replies: 1
    Last Post: July 31st, 11:28 PM
  5. Post Variables to External Script
    By Deb M. in forum ASP.NET General
    Replies: 2
    Last Post: July 11th, 05:35 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139