pocobueno1388
Members-
Posts
3,369 -
Joined
-
Last visited
Never
Everything posted by pocobueno1388
-
explode() www.php.net/explode
-
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"; } ?>
-
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.
-
Just look for online tutorials. Some good ones are www.tizag.com http://www.w3schools.com/php/default.asp
-
Yes So you would have to put the code to update their last login on your header page.
-
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)
-
your most weird obsession or weird thing about you?
pocobueno1388 replied to kellz's topic in Miscellaneous
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. -
Looks like you need some tutorials http://www.w3schools.com/php/default.asp www.tizag.com
-
your most weird obsession or weird thing about you?
pocobueno1388 replied to kellz's topic in Miscellaneous
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. -
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 ....."; ?>
-
SELECT * FROM table ORDER BY id Except Last Entry ?
pocobueno1388 replied to canalcasting's topic in PHP Coding Help
EDIT - On second thought, that query won't work... -
Well, why don't you just to an IF or Switch statement? <?php if ($gender == 'male') $tablename = 'male_table'; else $tablename = 'female_table'; ?>
-
Try putting quotes around the image name $im = imageCreateFromPNG("polaroidbg.png"); Also, make sure the path to the file is correct.
-
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>
-
Does this have anything to do with PHP? It works fine in both IE and Mozilla for me.
-
[SOLVED] Help! Problem creating session
pocobueno1388 replied to kjtocool's topic in PHP Coding Help
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'])) -
Please press solved =]
-
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.
-
Not sure if this will help or not Source: http://www.faqts.com/knowledge_base/view.phtml/aid/1262
-
<?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++; } ?>
-
unlink() http://us3.php.net/unlink
-
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.
-
<?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>
-
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
-
Yes, a session can be an array.