Jump to content

ManiacDan

Staff Alumni
  • Posts

    2,604
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by ManiacDan

  1. Can we see all of this string?
  2. the <tr> tag begins a new row. Take it out and you won't make new rows. That's all I can tell you without a more clearly defined question.
  3. Very weird. DIE() right after inserting the person, don't let the other two queries run. Does THAT work?
  4. This error message is saying "you are trying to put PersonID 2 into bestilling, but PersonID 2 doesn't exist in the Person table." So I'm asking: does personID 2 exist in the person table?
  5. Your code should be working, I don't understand why it's not. Is there a personID 2 in the Person table?
  6. The error message states that table Bestilling has a foreign key constraint. You may not insert a PersonID into Bestilling unless that PersonID already exists in the Person table.
  7. strpos does this for non-variable substrings. This really is the wrong way of going about things. So I guess it sounds...kind of functional but scary and slow. If it works, it works, we're not going to force you to rewrite it to be correct.
  8. You can't put HTML tags inside of HTML tags. Adding line breaks to this won't do any good. If you wish to add line breaks so the HTML source is prettier for some reason, use "\n": echo 'name="' . parseToXML($row['name']) . '" ' . "\n";
  9. Then what are you seeing on the screen? Are you seeing the <br> tags? What happens when you view the source of the page?
  10. Are you outputting this to a browser? <br /> is an HTML tag, it only works on HTML documents.
  11. <br /> isn't special, it's just part of the string. echo '<br />address="' . parseToXML($row['address']) . '" <br />';
  12. If it really represents a url, try urlencode
  13. You get NO error message on an INSERT statement? And the insert fails? Are you sure it's even running? It's pretty deep into some control structures. Echo the query before you execute it.
  14. PHPMyAdmin disables or moves the more dangerous features. Do it for real on the actual command line, or follow these instructions for some other ways.
  15. What is saying statement disabled? This is your own machine, you did a fresh install of MySQL, and you logged right into the command line? How did you create the database? What's the actual error?
  16. We don't do free work here, write this yourself and come back when you get stuck. Or download PHPMyAdmin.
  17. You might not have the privileges set up properly. Are you logged in as root?
  18. Do that at least for the time being, I bet your query is wrong. What you should be doing is something more like: $result = mysql_query($sql); if ( !$result ) { echo "Error with MySQL query:<br /><i>{$sql}</i><br />MySQL returned: " . mysql_error() . "<P />"; } Your IF statement is an assignment. You need simply if ( isset($thevar) ) This response doesn't make much sense, but what I'm saying here is you use $row in the URL for the form, but $row doesn't exist. You're printing a form with an action of "add_image.php?prodID=". I think that's the cause of your whole issue. You insert a row above where you print the form. Use msyql_insert_id to fetch the inserted ID, and use that in your form.
  19. 1) Add.php doesn't contain the text "show.php," so I don't see where it's forwarding at all. All I see is add_image.php 2) The error on show.php means your query is wrong, echo mysql_error() to get the actual mysql error message. 3) Josh was right about your IF statement being wrong. 4) This line refers to $row but $row is not available at that time. Again, answering Josh's question would have fixed this: <form enctype="multipart/form-data" action="add_image.php?prodID={$row['prodID']}" method="post" accept-charset="utf-8"> You are most likely not getting the variable that was pointed out in your first reply.
  20. This is the most common use case for a technology called AJAX. google for "ajax change drop-down" and you'll find thousands of articles.
  21. Not a line of this code is correct, so let's just ignore it and start over. You're looking for something like this? 12:00 AM 12:01 AM 12:02 AM //etc. 10:58 PM 10:59 PM 11:00 PM
  22. Not off the top of my head. Should I ever need something like this, I'd write it myself.
  23. Moving an image around in javascript is vastly different than cropping an image in PHP. I know it seems like it would be simple, but none of the code that does this viewing stuff is even PHP, it's all JavaScript. You would have to figure out the top-left and bottom-right corners of the "view port" as they relate to the image itself (you may not even have these figures). Then you'd have to post the image and the coordinates to a PHP script. Load the image using the gdimage library (which you may have to compile into PHP), create a new blank image of the appropriate size, and then use one of the imagecopy functions (like imagecopyresize) to copy the portion of the larger image into the new smaller image. Then save the new smaller image inside your web directory and serve it back using an <img /> tag.
  24. Alright now, everyone calm down. Hobbyist_PHPer, please don't mention that you hate someone who's trying to help you so much it would drive you to deicide. The second part of Jessie's post you quoted was, in fact, part of her standard signature and not necessarily a commentary on you. I'm going to close this thread before this fight escalates. If you try jquery and still have issues with it, please open a new thread with a new problem description in the appropriate area.
  25. You're ordering by URL. Didn't you want it ordered by title?
×
×
  • 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.