-
Posts
1,686 -
Joined
-
Last visited
Never
Everything posted by Lamez
-
so I do not get it, does that mean $a is checked? what is $b? is ticked, mean checked? -Thanks Once Again!
-
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
-
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); } ?>
-
could I do foreach(glob('/my/folder/*.jpg && *.jpeg') as $file){ unlink($file); }
-
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?
-
club-nex.com beta testing. Your feedback is appreciated.
Lamez replied to chinamannnz's topic in Beta Test Your Stuff!
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 -
so I fixed the autocomplete. Now does the avatar uploaded seem more secure?
-
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
-
<?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 ?>
-
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!
-
<?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
-
Ya, it is a lesson learned. From the manual! http://us3.php.net/for
-
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
-
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?
-
well if I change it to < then it displays one less If I want 2 bowls it only shows 1!
-
[SOLVED] tag cloud ... help please b4 I shoot myself ...
Lamez replied to imarockstar's topic in PHP Coding Help
He means define the variable, and I am guessing that is what it needs to be. <?php $desc = $row['desc']; ?> -
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?
-
bump.
-
it is in my head.php which is not shown. I could show the whole code if needed.
-
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"; ?>
-
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?
-
it does check file extensions, but what is MIME or w\e?
-
http://us.php.net/rename