| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jun 2006
Posts: 44
|
php form validation problem
Hi guys, I haven't been on here for a long while as my job doesn't require me to use php very often. But as I got a lot of help from you all before I have returned here with what I think is probably a pretty simple problem... I originally created a web site form which uses both Javascript and php to validate. It also sends out a couple of emails - one to my company and one to the person who filled out the form. This has worked fine for ages, however having updated the website today with some minor changes (none to the form itself), I noticed that the form isn't working properly. The page is displaying the form fields filled out with what is entered as the value for that field - for example for the first name field I have <input type="text" name="first_name" tabindex="2" value="<? echo $first_name; ?>"/> and within the field ie displays <? echo $first_name; ?>"/ Also, after the submit button at the bottom, ie displays "> I'm sure this is something simple (I'm probably being pretty thick here) and anyone who works with php will know what's going on, but I'm confused as to why this has started to do this without me changing anything to my knowledge?! I suspect it may be a small error in the code but any ideas? Thanks for any help. |
|
|
|
|
|
#3 (permalink) |
|
Everything is fine.
|
It looks like you're using PHP short tags. Even if you have not changed anything, your server admin could have disabled the use of short tags which will render your PHP code inoperable. Try using <?php $echo $first_name; ?> as opposed to <? echo $first_name; ?> and see if that makes a difference. - Mike Mike Mackay - Developer
|
|
![]() |