PHP and HTML help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mettlehead
Forum Newbie
Posts: 15
Joined: Fri Oct 11, 2002 11:03 am
Location: Canada

PHP and HTML help

Post by mettlehead »

Hi,

I am setting up a form in html which will take the data and send an email through php, my form is done, but I get this error in my php script.

Warning: Unexpected character in input: ''' (ASCII=92) state=1 hardware.php on line 23

Parse error: parse error, unexpected T_STRING
hardware.php on line 23

The error come on text fields that I use math to calculate, I am not sure if they have to be strings or not. the state =1 may be mu checkbox. Any ideas?
User avatar
mr_griff
Forum Commoner
Posts: 64
Joined: Tue Sep 17, 2002 11:11 am
Location: Bozeman, Montana

Post by mr_griff »

Can you post your code for us to see...
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

a little code

Post by phpScott »

I don't off the top of my head but if you post a little of your code that shows the form and the php you are using to generate the email, it might help. If you are using javascript to make the calculation before the page is submitted it then int or string types won't make a dif as javascrript doesn't care about that sort of thing.

phpScott
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

It's possible that the error is not on line 23 but one before as PHP only reports a parse error when it can no longer parse the page, not necessarily where the error is in the code. So as the other have already said, we can't help you without seeing some code.

Mac
Post Reply