Jump to content

Syntax Errors and unexpected tokens


krixham

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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.