Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. Laptop, just because you can bring it on the go Eyesight or Hearing
  2. Coke. I'm not sure what you mean by that, because isn't Pop and Coke the same thing? Coke is also a brand name, but some people interchange the words pop, coke, and soda. I will just go with coke...hah. Hamburger or Hot dog
  3. Here is my info - Screen Resolution: 1024 x 768 Firefox Version: 2.0.0.11 I attached a screen shot of what the table looks like to me. [attachment deleted by admin]
  4. Cola. I don't like the strong taste of coffee. If I do ever drink it, you would never know it was coffee because I completely drown it out with sugar and cream Dog or Cat
  5. In Firefox your fiction/about table aren't coming together right, the images are going on different lines and it's all messed up. Other than that, it looks great, IMO =]
  6. It's not even the height that keeps changing...its the font size, the size of the logo, and the height (which I am sure is caused by the other two). As mentioned before, I would do something else with the navigation. Overall the site doesn't "wow" me at all...but I guess it passes for descent.
  7. What are the errors? Also, you aren't defining your variables <?php class user_traits { var $id; var $password; //...etc
  8. Well, if there are no results, then your while loop isn't going to execute any code in between. So I'm assuming no results are being returned.
  9. Change include('functions.php); To include('functions.php');
  10. But if you change $limit to "10" it works? That doesn't make sense...
  11. <?php $sql = "SELECT * FROM beepbopboop WHERE entry_id = '$entryid' ORDER BY id DESC"; $result = mysql_query($sql, $conn) or die(mysql_error()); if (mysql_num_rows($result) < 1){ //no results returned } else { //results found } ?>
  12. Did you change this line $query = "SELECT * FROM goldies WHERE Sender='$username' LIMIT $offset,10"; To $query = "SELECT * FROM goldies WHERE Sender='$username' LIMIT $offset, $limit";
  13. Here is a solution <?php $date = explode('/', $_POST['release_date']); $release_date = $date[2].'-'.$date[1].'-'.$date[0]; $release_date = date("Y-m-d", strtotime($release_date)); mysql_query("INSERT INTO ratings_software (release_date) VALUES('$release_date')")or die("You have an error because:<br />" . mysql_error()); ?>
  14. I tested it, and it worked fine for me 0_o EDIT: Nevermind, I was doing the wrong format >.>
  15. you are passing it a posted date (such as 29 september 2007) when it needs a timestamp instead try $tstamp = strtotime($_POST['release_date']); mysql_query(" INSERT INTO ratings_software (release_date) VALUES('$tstamp)")or die("You have an error because:<br />" . mysql_error()); The date needs to also be converted to the correct format, the code I supplied will do that.
  16. As said above, you should always store date formats in the DB like yyyy-mm-dd. So your code should look like this <?php $release_date=date("Y-m-d", strtotime($_POST['release_date'])); mysql_query(" INSERT INTO ratings_software (release_date) VALUES('$release_date')")or die("You have an error because:<br />" . mysql_error()); ?>
  17. No problem Don't forget to press "Topic Solved".
  18. Yes, that is exactly what it does. You can use the same method for an edit button or whatever else =]
  19. Hmmm...did you try changing what I told you to?
  20. Try <?php $curentPage = basename($_SERVER['SCRIPT_NAME']); if (($currentPage != 'index.php')&&($currentPage != 'checkout.php')) { //do something }else{ //do something else } ?>
  21. Try changing this line $query="INSERT INTO Books (Title,Author,Publisher,ISBN,Year,Price) VALUES ($title,$author,$publisher,$isbn,$year,$price);"; To $query="INSERT INTO Books (Title,Author,Publisher,ISBN,Year,Price) VALUES ('$title','$author','$publisher','$isbn','$year','$price')"; So it's adding numbers to the database instead of what you typed in?
  22. Do this <BODY> <h1>Insert Book into Table</h1> <form name="form1" method="Post" action="AddBook.php"> Title:<INPUT TYPE="text" NAME="title"> Author:<INPUT TYPE="text" NAME="author"> Publisher:<INPUT TYPE="text" NAME="publisher"> ISBN:<INPUT TYPE="text" NAME="isbn"> Year:<INPUT TYPE="text" NAME="year"> Price:<INPUT TYPE="text" NAME="price"> <INPUT TYPE="submit" name="submit" Value="Insert"> <INPUT TYPE="reset"> </form> <?php //Set Variables for the database access: $host="***"; $user="***"; $password="***"; $DBname="***"; $TableName="Books"; $Link = mysql_connect($host,$user,$password); @mysql_select_db($DBname) or die( "Unable to select database"); if (isset($_POST['submit'])){ $query="INSERT INTO Books (Title,Author,Publisher,ISBN,Year,Price) VALUES ($title,$author,$publisher,$isbn,$year,$price);"; if(mysql_db_query($DBname,$query,$Link)){ print("The book was added successfully! \n"); } else{ print("The book was not added! \n"); } print($query); mysql_close($Link); } ?> </BODY>
  23. mysql_db_query() sends the query, so yes...that is enough.
  24. The syntax in the query is still wrong. You have the end quote in the wrong place, and also missing a parenthesis. Try my code and see if it works.
×
×
  • 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.