Jump to content

cello10

Members
  • Posts

    12
  • Joined

  • Last visited

cello10's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Solved the issue, can someone close this topic and the other one?
  2. OK but adding: echo $sql; doesn't work. It was placed before ?> on the line before that. Still not getting it.
  3. Uploaded with.php extension and verified with my host but let me try the php5 extension and such. EDIT: Under .cgi I experienced: Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@wandwbook.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. and with the php5 extension it's still the same. The could should generally work right?
  4. So I have this script. I connected the database and verified a working connection to the base, password correct. As I save the script on my server it saved the changes and I view the file online. The resulting page is blank. Really need help completing this code as it's essential to my sites organization, have a look below and help me if possible. <?php //make connection mysql_connect('localhost', 'cello10_employees', 'brigite27'); //select db mysql_select_db('cello10_tutorials'); $sql="SELECT * FROM employees WHERE age='23'"; ?> Thanks Emanuel
  5. OK, how can I find the content of the mysql_error()? And yes that is exactly the error message.
  6. Already tried that but still generates the same result.
  7. OK, when there is no $ sign on the query the message is as follows Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in /home/cello10/public_html/display.php on line 10 if it's $query as you told me then it's Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/cello10/public_html/display.php on line 10
  8. Still gives the same error. Any other ideas?
  9. OK, I'm sure it works, try it out in a moment but I want to know how the solution works in response to the error? Thanks for the "spoonfeeding approach".
  10. What do you mean with query? It's all I have besides the database... I didn't create anything else??? Please elaborate...
  11. So I've followed this code, corrected about 12 error, talked to my hosting and I am so done. I have tried everything but the error won't go away. The code is pasted below. As it's really late any help would be appreciated that would make my day the next day... <?PHP //connect to server $connect = mysql_connect("localhost","cello10_import","brigite27"); //connection to database mysql_select_db("cello10_import"); //query the database $query = mysql_query("SELECT * FROM users WHERE cover_image = 'http://d1w7fb2mkkr3kw.cloudfront.net/assets/images/book/small/9781/2500/9781250038821.jpg' "); //fetch the results / convert into array WHILE($rows = mysql_fetch_array(query)): $cover_image = $rows['cover_image']; $title = $rows['title']; $author = $rows['author']; echo "$cover_image<br>$title<br>$author<br><br><br>"; endwhile; ?> The error experienced is: Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in /home/cello10/public_html/display.php on line 10 Thanks for your help
×
×
  • 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.