Jump to content

pocobueno1388

Members
  • Posts

    3,369
  • Joined

  • Last visited

    Never

Everything posted by pocobueno1388

  1. explode() www.php.net/explode
  2. As you explained, your URLs look like this http://www.mcatzone.com/user1' They should look something like this http://www.mcatzone.com/your_script.php?delete=user1 Then on "your_script.php", you would put the following code. <?php if(isset($_GET['delete'])){ $delete = $_GET['delete']; $query = mysql_query("DELETE FROM table WHERE username='$delete'")or die(mysql_error()); echo "Deleted"; } ?>
  3. Not to turn this into a "good books" thread (I think there is already one)...but my personal favorite is "MySQL/PHP5 for the absolute beginner" by Andy Harris. Although I don't think there is anything more you can learn from a book that you can't learn online.
  4. Just look for online tutorials. Some good ones are www.tizag.com http://www.w3schools.com/php/default.asp
  5. Yes So you would have to put the code to update their last login on your header page.
  6. Just to expand on the last post, your query would look something like this SELECT col FROM users WHERE last_online > (NOW() - INTERVAL 5 MINUTE)
  7. You say that as if road rage is a disease and you can't help it...you should really get into a anger management class if you really can't control yourself.
  8. Looks like you need some tutorials http://www.w3schools.com/php/default.asp www.tizag.com
  9. Yep, I do that one too...maybe not as extreme though. Every once in a while one of my eyes will feel heavier than the other, so I will have to blink a few times putting more emphasis on the "lighter" eye to make both eyes feel equal. I don't do this much anymore, but I used to do it all the time.
  10. Yes, you would just do this...I'm pretty sure I understand what you mean. <?php if ($gender == 'male') $tablename = 'Male'; else $tablename = 'Female'; $query = "INSERT INTO $tablename ....."; ?>
  11. Well, why don't you just to an IF or Switch statement? <?php if ($gender == 'male') $tablename = 'male_table'; else $tablename = 'female_table'; ?>
  12. Try putting quotes around the image name $im = imageCreateFromPNG("polaroidbg.png"); Also, make sure the path to the file is correct.
  13. Try this instead <?php session_start(); if (isset($_SESSION['count'])) $_SESSION['count']++; else $_SESSION['count'] = 1; $msg="you've been here {$_SESSION['count']} times"; ?> <html> <head> <title>start a session count</title> </head> <body> <?php echo $msg; ?> </body> </html>
  14. Does this have anything to do with PHP? It works fine in both IE and Mozilla for me.
  15. In options.php when do you define $userID? I don't even see a session on your previous page thats called userID. Change this if (!isset($userID)) To if (!isset($_SESSION['userName']))
  16. The negative is telling it to go backwards on the string. So it's going one space back, which covers the 'c', therefor only printing the 'ab'. If you put a -2 instead of -1, it would only show 'a' because it is going backwards two spots covering the last two letters. Hopefully that makes a little bit of sense =] Just play around with it and you will figure out how it works.
  17. Not sure if this will help or not Source: http://www.faqts.com/knowledge_base/view.phtml/aid/1262
  18. <?php $i=1; while($row = mysql_fetch_array( $fetch )) { // Print out the contents of each row into a table echo "<tr>"; echo "<td style='border-bottom: 1px solid #000000;text-align:center'>"; echo "<span class='lip2'>"; echo $i.' <a href="'.$_HTTPS['PHP_SELF'].'show.php?sku='.$row['sku'].'&productDetail='.$row['title'].'" style="color:#000000">'; echo $row['size']." "; echo $row['title']." "; echo $row['type']; echo "</a>"; echo "</span>"; echo "</td>"; echo "</tr>"; $i++; } ?>
  19. unlink() http://us3.php.net/unlink
  20. Go to your GoDaddy account and rummage through everything...you will find it eventually. If I remembered exactly where to go, I would tell you. I recall having a difficult time finding it though.
  21. <?php $arr = array(); if (isset($_POST['submit'])){ $arr[] = $_POST['var']; print_r($arr); } ?> <p> <form method="post"> <input type="text" name="var"> <input type="submit" name="submit"> </form>
  22. Take a look at these for an example http://www.php-shopping-cart-tutorial.com/shopping-cart.htm http://www.thewatchmakerproject.com/journal/276/building-a-simple-php-shopping-cart
  23. Yes, a session can be an array.
×
×
  • 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.