Jump to content

Archived

This topic is now archived and is closed to further replies.

krixham

Syntax Errors and unexpected tokens

Recommended Posts

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:
[blockquote]
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.
[/blockquote]

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:
[blockquote]
?php: No such file or directory
syntax error near unexpected token `('
`$conn = mysql_connect("localhost","user","password");'
[/blockquote]

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!

Kathy

Share this post


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

Share this post


Link to post
Share on other sites
We would have to see the code to tell you where the extra ( is that is throwing off your code.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.