Jump to content


Syntax Errors and unexpected tokens

  • Please log in to reply
2 replies to this topic

#1 krixham

  • Members
  • Pip
  • Newbie
  • 6 posts

Posted 21 March 2006 - 08:55 PM

Oh, where do I start?

I am building a web site with PHP and MySQL. And struggling, as my prior posts have revealed. I have no 'tools' to help me with it, and am writing the html, php, and queries from scratch.

Is there some rule that says I cannot do this:
1. Run index.html, which launches a php script and lists all the clients. THIS IS WORKING
2. Depending on the client, and if they have information in 'sub jobs', do one of two things (this is part of a cgi script) -
If they have nothing listed in the MySQL table for a sub job, then list all the order numbers - THIS IS WORKING
If they have something listed in the MySQL table for a sub job, then launch another php script.

That's where I start having trouble...

I have written the script with html and php. All of a sudden the server doesn't seem to like the coding for php. I've even gone so far as to try to launch the 'helloworld.php' script, with no luck. Now, helloworld works fine in the web browser itself, just not when it's launched inside the cgi script.

I keep getting things like:
?php: No such file or directory
syntax error near unexpected token `('
`$conn = mysql_connect("localhost","user","password");'

I have tried using Korn Shell and Perl and even just HTML. Nothing works. But other scripts set up the same way are working. And, to be honest, it's almost like when I get to this it doesn't want to do a new php session.

I am tearing my hair out here. HELP!


#2 Prismatic

  • Members
  • PipPipPip
  • Advanced Member
  • 503 posts
  • LocationSan Diego

Posted 21 March 2006 - 09:24 PM

Why dont you just design the whole thing in one form (php) insted of trying to mix .html, .cgi, and .php scripts?

#3 txmedic03

  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 22 March 2006 - 09:42 AM

We would have to see the code to tell you where the extra ( is that is throwing off your code.


I can't stop you from doing something silly, but at least I can help you do it right.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users