pocobueno1388
Members-
Posts
3,369 -
Joined
-
Last visited
Never
Everything posted by pocobueno1388
-
Laptop, just because you can bring it on the go Eyesight or Hearing
-
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
-
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]
-
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
-
Paypal?
-
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 =]
-
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.
-
What are the errors? Also, you aren't defining your variables <?php class user_traits { var $id; var $password; //...etc
-
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.
-
Change include('functions.php); To include('functions.php');
-
But if you change $limit to "10" it works? That doesn't make sense...
-
<?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 } ?>
-
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";
-
[SOLVED] simple date store not working?
pocobueno1388 replied to delphi123's topic in PHP Coding Help
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()); ?> -
[SOLVED] simple date store not working?
pocobueno1388 replied to delphi123's topic in PHP Coding Help
I tested it, and it worked fine for me 0_o EDIT: Nevermind, I was doing the wrong format >.> -
[SOLVED] simple date store not working?
pocobueno1388 replied to delphi123's topic in PHP Coding Help
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. -
[SOLVED] simple date store not working?
pocobueno1388 replied to delphi123's topic in PHP Coding Help
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()); ?> -
No problem Don't forget to press "Topic Solved".
-
Yes, that is exactly what it does. You can use the same method for an edit button or whatever else =]
-
Hmmm...did you try changing what I told you to?
-
Try <?php $curentPage = basename($_SERVER['SCRIPT_NAME']); if (($currentPage != 'index.php')&&($currentPage != 'checkout.php')) { //do something }else{ //do something else } ?>
-
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?
-
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>
-
mysql_db_query() sends the query, so yes...that is enough.
-
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.