The echo "url is ".$url displays the right value, so it should go to that url. Instead, It goes to "write_review.php?comment="... Where does the comment come from????? :confused: :confused:
I really don't get where that comes from at all.
You can check it out at http://www1.coe.neu.edu/~lleccia/ISYG250/proj5/index.php try to write a review (id: user, pw: pass) and see when submitting

sidney

04-18-2004, 12:56 AM

you are useing get to pass data from form so comment is added when you submit the form

firepages

04-18-2004, 01:56 PM

Your sample page bears no relation to the problem in the code you post , e.g. it does not use a form , I can only assume that in your real caod you managed to rewrite $url value before you actually used it.

The only time PHP will alter your script is when rewriting urls with a session id , & unless you have set your session name to 'comment' what you describe can't happen, probbably a typo somewhere.

Lau

04-18-2004, 05:01 PM

sidney - well.. It works. I changed get to post, and the file reload itself!

I don't really understand why that is though...
I'm using GET to retrieve variables from the url, so I should be using get, shouldn't I?

sidney

04-18-2004, 05:06 PM

the form was adding the get vars to the url so over writing exsisting possibly

the way to do it by get would be to have hidden fields in form for vars class and id and then when form is submitted all vars in form would be added to url