Page 1 of 1

PHP echo help

Posted: Thu Jul 26, 2007 5:18 am
by ljriley2007
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hey guys im completly new to php code and ive been tryin to get as much syntax into my head as possible
what i have is a log on page that on the correct users email address it redirects you to a members area
but to try and make it a bit more secure i have put .php?p=(scrambled password) at the end so when the members
area loads it gets the password checks it and then displays the page using echos

however i keep getting parse error unexpected T_echo in line blah blah

this is what i have (snippet)

Code: Select all

<?php

$pass=$_Get[p]

 if ($pass == "blah blah") 
 {

echo '<TABLE height=321 cellSpacing=0 cellPadding=0 width=1 align=center border=0>';
echo '<TBODY>';
echo  '<TR>';
echo '<TD width=770 colSpan=3 height=78>';
echo '<TABLE height=12 cellSpacing=0 cellPadding=0 width=530 border=0>';
echo '<TBODY>';
echo '<TR>';

etc....

with a 
} ?>
at the end

i have tried putting " s instead of ' s at the start and end of each echo line but same error
any help would be appreciated

thanks in advance


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Thu Jul 26, 2007 5:44 am
by xdallen
Firstly, you have to make clear of the superglobal variable syntax.

The syntax for GET superglobal is

Code: Select all

$_GET["variable_name"]
.
Another thing is you miss a ";" behind the $_Get line.

Please change and see it can be parsed correctly or not.

Posted: Thu Jul 26, 2007 6:34 am
by miro_igov
Sending passwords via GET method is not good idea.