|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PHP with javascript inside doesn't work...PLEASE HELP
I have a php script with a javascript inside. But nomather what i do, I get errors...
Se the attached file |
|
#2
|
||||
|
||||
|
You get error in PHP or in Javascript ?
Puttin only code up doesnt help. Put up error too. JD
__________________
_____________________________ d.k.jariwala (JD) ~ simple thought, simple act ~ I blog @ http://jdk.phpkid.org |
|
#3
|
|||
|
|||
|
Here is the error:
Parse error: parse error in /home/sites/site300/web/shop/shop_checkout.php on line 449 But line 449 does not contain any text at all... |
|
#4
|
||||
|
||||
|
Actually you have missed closing of single or double quotes or a semicolon.
In that case, parser gets confused and gives wrong line number. It is not compulsory that error is on that line only. It may be on that line or previous lines. As such your code is lengthy and not formatted properly so its hard to debug, you would have"to do it yourself. JD |
|
#5
|
|||
|
|||
|
It helps if you don't mix large pieces of HTML and PHP, and definitely not in PHP control structures. For example, line 48-50,
PHP Code:
and then follows a lot of HTML. Where does the else block end? No wonder you get confused. What I usually do, is first arrange all the complicated PHP stuff, then put all the HTML as 'here doc' text, in which you can insert PHP variables. Example: PHP Code:
__________________
Code:
Groetjes van Harry! 8-) |
![]() |
| Viewing: Dev Shed Forums > Web Design > JavaScript Development > PHP with javascript inside doesn't work...PLEASE HELP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|