syntax/parse error

hi all,

ive got this syntax/parse error

i tried almost everything, but cant seem to get it right :

heres the code:

$handle = @fopen("articles/"$_POST["name"].", "w"); 

btw anyone know of any php syntax checkers? i cant find one on google

many thanks
c0lin :)

I think it is supposed to be like this:

$handle = @fopen(“articles/$_POST[“name”]”, “w”);

double quotes allow the replacement of variables.

Im confused as to why their are double quotes on the inside of the global variable anyways? Those are suppose to be single quotes, right?.. Try this…

$handle = @fopen(“articles/{$_POST[‘name’]}”, “w”);

Thanks for the replies, drewbees version worked a treat :)

but now i have another problem…

whenever i try to submit data to this script it gives me ‘a cannot find server’ page : (ive tried a few times now)

any ideas?

Thanks
c0lin

anyone? :-?

what is the rest of the code?? Either that, or your server is down. :)

heres the rest of my code:


i dont think my server is down as i can get to my main page

thanks for the reply btw drewbee :)

Colin

Make sure the form is pointing to the right script.

Sponsor our Newsletter | Privacy Policy | Terms of Service