Hi,

    I have been using PHP for some time now and I, for one,
never had such problems. I'm pretty sure the problem is elsewhere.
    For instance, when creating the HTML form, you have to make
sure everything is quoted perfectly:
    <FORM actip="script.php" method="POST">
        <INPUT type="hidden" name="example" value="some_val">
    </FORM>
    And then in PHP, you have to quote indexes of an associative array:
    $_POST["example"].
    When uploading files, remeber to use the
    <form enctype="multipart/form-data" ...


Cheers,
Catalin

"Mohamed S." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm have a strange problem. I've encoutered a few before, but nothing like
> this:
>
> New machine with php4.2.2 on RedHat with Apache2.0
>
> All my forms use POST method. But I noticed that some scripts when i
submit
> the form, i get wierd data.
>
> For example:
> say i have <input type=hidden name="example" value="val">
>
> then what i will get for $example is the string "valexample=val" instead
of
> just "val"!!! even the $_POST[example] variable gives the same thing...
>
> magic quotes and globals are ON.
>
> If i put it to GET, then it works fine. But i don't want to put GET!
> Especially that you can't use get for file uploads.
>
> Also, i think this is screwing up my uploads! I uploaded a text file and
saw
> that it inserted a bunch of text right in the middleof the file!!
>
> Something like:
> -----------------------------7d3323a150580
> Content-Disposition: form-data; name="userfile"; filename="C:\Documents
and
> Settings\file.txt"
> Content-Type: text/plain
>
>
> So something is causing my php to insert the name of the variable and
other
> stuff into the variable itself..ANY IDEAS?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to