noob needs help
Posted: Sun Jul 24, 2005 1:33 pm
ok im a complete php n00b and have only been programming a few weeks and im slowly getting the hang of it. atm im trying to modify a form mailer which currently has things like if
field=="";
print "you suck";
but anyway i have been changing the print bit to display some html code with some variables such as error type and admin contacts in etc. but my problem is ordering. i made the page body with some variables in such as $error_type and was expecting to add a $error_type and a print $messagebody in at each possible error but it works fine expect for i didnt realise that the type variable is called from ABOVE the message so how could i make the message change each time as easily as possible.
also some other n00b questions the book didnt cover...
what is the difference between echo and print?
and what is the difference between 'single' and "double" quotes
Cheers
field=="";
print "you suck";
but anyway i have been changing the print bit to display some html code with some variables such as error type and admin contacts in etc. but my problem is ordering. i made the page body with some variables in such as $error_type and was expecting to add a $error_type and a print $messagebody in at each possible error but it works fine expect for i didnt realise that the type variable is called from ABOVE the message so how could i make the message change each time as easily as possible.
also some other n00b questions the book didnt cover...
what is the difference between echo and print?
and what is the difference between 'single' and "double" quotes
Cheers