Jump to content

Lamez

Members
  • Posts

    1,686
  • Joined

  • Last visited

    Never

Everything posted by Lamez

  1. so I do not get it, does that mean $a is checked? what is $b? is ticked, mean checked? -Thanks Once Again!
  2. I use to have a long php script, but some how I lost it. I was wondering how could I process multiple check boxes? If checked: update mysql database if not checked: do nothing
  3. well I did not try, but it would not hurt to add 2 foreach loops <?php foreach(glob($idir.'*.jpg') as $file){ unlink($file); } foreach(glob($idir.'*.jpeg') as $file){ unlink($file); } ?>
  4. could I do foreach(glob('/my/folder/*.jpg && *.jpeg') as $file){ unlink($file); }
  5. I have a folder filled with a bunch of images, that are named 1.jpeg, 2.jpeg 3.jpeg but there is about 30-40, so is there a way to delete all the images in the folder?
  6. I have not read all the post but you got some xss and maybe mysql injection in your search! http://club-nex.com/search/?q=\%3CB%3E%3Cmarquee%3E%3Ch1%3E%3Ca%20href=%22http://www.google.com%22%3EGOOGLE%3C/a%3E
  7. so I fixed the autocomplete. Now does the avatar uploaded seem more secure?
  8. this is very simple: something like this: PAGE 1 <?php session_start(); $_SESSION['page_1'] = true; echo "This is page 1"; echo '<br /><a href="page_2.php">Page 2</a>'; ?> PAGE 2 <?php if (!isset($_SESSION['page_1'])){ header("Location: page_1.php"); }else{ echo "Welcome to page 2!"; } ?> Hope that helps\works
  9. <?php session_start(); $_SESSION['message'] = "Text from script"; //sets message to a session variable. header("Location: new_page.php"); //redirects to new_page.php in 0s echo $_SESSION['message']; //echos out Text from script ?>
  10. Thanks for the replys, I have made some fixes but you are now required to login go here: http://krazypicks.com user: demo1 pass: demo then go here: http://krazypicks.com/user/avatar_uploader.php -Thanks Guys!
  11. <?php $mails = array("1@email.com", "2@email.com", "3@email.com", "4@email.com", "5@email.com"); ?> <select name="select" id="select"> <option><?php echo $mails['0']; ?></option> <option><?php echo $mails['1']; ?></option> <option><?php echo $mails['2']; ?></option> <option><?php echo $mails['3']; ?></option> <option><?php echo $mails['4']; ?></option> </select> very simple
  12. Ya, it is a lesson learned. From the manual! http://us3.php.net/for
  13. oh ok gotcha, well some how I made a never ending loop, with a mysql query and it max my 100,000 connections, so I have to wait an hour , man I am stupid
  14. very simple you are going to need to pull the five contacts, then add them into a while loop. But I do not see where you are storing your contacts. A database?
  15. well if I change it to < then it displays one less If I want 2 bowls it only shows 1!
  16. He means define the variable, and I am guessing that is what it needs to be. <?php $desc = $row['desc']; ?>
  17. I sill do not understand, if you read one of my last topics, I am having a hard time figuring it all out. So do I need to make it a equal sign instead?
  18. it is in my head.php which is not shown. I could show the whole code if needed.
  19. also it is adding 1 more row than is should, and echoing out 2 more than it should. Why!? It made it look all funky, maybe this helps you help me! First For loop: <?php echo '<center>'; $num = $_POST['bowl_num']; if ($num == (0)){ header("Location: ?".$get."=".$start_over); } echo '<form method="post" action="?'.$get.'='.$add.'" enctype="multipart/form-data">'; echo '<table width="100%" border="0">'; for ($counter = 1; $counter <= $num; $counter++) { ?> <tr> <td width="10">Bowl Number: <?php echo $counter; ?></td> <td width="10"><input name="<?php echo $counter; ?>" type="file" class="form" id="<?php echo $counter; ?>"></td> </tr> <?php }//end for loop echo ' <tr> <td colspan="2"><label> <input type="submit" name="bowl_up_con" id="bowl_up_con" value="Continue" /> </label></td> </tr> </table>'; echo '</center>'; $_SESSION['num'] = $counter; $_SESSION['up'] = true; ?> Second For loop: <?php $num = $_SESSION['num']; if($_SESSION['up'] !== (true)){ header("Location: ?".$get."=".$start_over); } for ($counter = 1; $counter <= $num; $counter++) { $image = $_POST[$counter]; $id = $counter; $name = "OH-YA !"; $date = "not_set"; $network = "this"; $place = "Texas"; $query = "INSERT INTO `foot_bowls` (id, name, image, date, network, place) VALUES ('".$id."', '".$name."', '".$image."', '".$date."', '".$network."', '".$place."')"; mysql_query($query)or die(mysql_error()); }//end loop echo "Added ".$counter." bowls"; ?>
  20. ok I am working on my football pool website, and I am having it where the admin can add bowls, so I have a page where you enter how many bowls so here is the for loop after that question: <?php $num = $_POST['bowl_num']; if ($num == (0)){ header("Location: ?".$get."=".$start_over); } echo '<form method="post" action="?'.$get.'='.$add.'" enctype="multipart/form-data">'; echo '<table width="100%" border="0">'; for ($counter = 1; $counter <= $num; $counter++) for ($counter = 1; $counter <= $num; $counter++) { ?> <tr> <td width="10">Bowl Number: <?php echo $counter; ?></td> <td width="10"><input name="<?php echo $counter; ?>" type="file" class="form" id="<?php echo $counter; ?>"></td> </tr> <?php }//end for loop echo ' <tr> <td colspan="2"><label> <input type="submit" name="bowl_up_con" id="bowl_up_con" value="Continue" /> </label></td> </tr> </table>'; echo '</center>'; $_SESSION['num'] = $counter; $_SESSION['up'] = true; ?> so then when the admin clicks continue, it takes them to this for loop: <?php $num = $_SESSION['num']; if($_SESSION['up'] !== (true)){ header("Location: ?".$get."=".$start_over); } for ($counter = 1; $counter <= $num; $counter++) { $image = $_POST[$counter]; $id = $counter; $date = ""; $network = ""; $place = ""; $query = "INSERT INTO `foot_bowls` (id, name, image, date, network, place) VALUES ('".$id.",' '".$name."', '".$image."', '".$date."', '".$network."', '".$place."')"; mysql_query($query); }//end loop echo "Added ".$counter." bowls"; ?> Well you see at the end there where it says: Added ".$counter." bowls"; well if I set 10 bowls it comes out to be 12, it is adding 2 for some reason, anybody know why?
  21. it does check file extensions, but what is MIME or w\e?
×
×
  • 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.