Jump to content

JAY6390

Members
  • Posts

    825
  • Joined

  • Last visited

Everything posted by JAY6390

  1. use header('Location: http://www.paypal.com/URI_to_link_here'); after you insert into the db?
  2. Is there a success being set? I am guessing that you are using a form and sending success as a variable of the form. If not, you need something like if(isset($_GET['success']) && $_GET['success'] == "1") { echo "Thank you for registering, Your browser will soon be redirected our home page!"; }else{ echo "Error"; } Can you show your form as I am guessing you are not setting $_GET['success'] anywhere
  3. change it to $_GET["success"] == "1"
  4. I'm amazed you think I'm rude since I answered your orginal post as best I could then gave you a reason for why I put my answer and told you you need to be more specific. That's not rude, it's just what needs to be done Anyway, regarding your question, you need it just after here if (move_uploaded_file($ftmp, $fname)){
  5. DELETE FROM `albums` WHERE `album`.`name` NOT IN (SELECT `tracks`.`album`) That will do it ONLY if `tracks`.`album` is the actual album name It would be better if you used id's rather than names since ids are always unique
  6. Depends what the script is used for to be honest. If it's referencing multiple tables, then it's highly likely it will have primary keys for data etc
  7. Like it's been said above it's more than likely the auto_increment. did you specify the fieldname and value for that in your latest query that is running? if you have an auto increment field it's always best to use NULL for it's value without any quotation marks
  8. '%<td>([^<]+)([a-z0-9])</td>%si' thisis728whatineed will be in $matches[2] the rest will be in $matches[1] (without the <td> and </td>)
  9. http://www.php.net/str_replace Why not just use str_replace if you need to do this with just a ' ? You need to change your regex code to return preg_replace('/\\'/', '', $str); and that should solve it
  10. or this...where 1 is the minimum and 2 is the maximum preg_match('%\(([a-zA-Z]{1,2})\)%', $name, $flag);
  11. Then perhaps you should have mentioned that instead of getting angry. We're not mind readers. You said you weren't sure what you needed to do next to resize it, not "Where do I need to add my image resize code"
  12. preg_match('%\(([a-zA-Z]+)\)%', $name, $flag);
  13. google really is your friend http://www.lmgtfy.com/?q=php%2Btutorial%2Bresize%2Bimage
  14. preg_match('%\(([a-zA-Z])\)%', $name, $flag); Try that
  15. My first advice would be learn how to use simple mysql functions, since you clearly don't know what you're doing Check out a few tutorials. I recommend http://www.phpvideotutorials.com/lesson13/ http://www.phpvideotutorials.com/lesson14/ or http://www.w3schools.com/php/php_mysql_intro.asp
  16. That was the whole reason for implementing the $days_in_month, so that you can set that before the for loop depending on the month
  17. $days_in_month = 31; $booked_date = substr($booked['datebooked'],0,2); for($i = 1; $i < $days_in_month; $i++) { echo '<td>'; $num = str_pad($i,2,'0',STR_PAD_LEFT); echo ($booked_date == $i) ? '<font color="blue">'.$num.'</font>' : $num; echo '</td>'; } That should get you started
  18. I'd have to agreee with PFM. Your best bet would be to use a script to add the dates to a new column called bday or something like that, keeping the original birthday column as you have it already, and putting proper date formats in those date fields. For example use the following script. It will add the field `bday` to your table `employees` and update each of the birthdays <?php /** * @author Jay Gilford */ mysql_connect('localhost','root',''); //Change these to your database login details mysql_select_db('test'); //Change this to your database name $query = "ALTER TABLE `employees` ADD `bday` date"; mysql_query($query); $query = "SELECT `id`, `birthday` FROM `employees`"; $res = mysql_query($query); while($row = mysql_fetch_assoc($res)) { $query = sprintf("UPDATE `employees` SET `bday` = '%s' WHERE `id` = '%s'", date('Y-m-d', $row['birthday']), $row['id']); mysql_query($query); }
  19. Can you give some examples of the data for the field birthday?
×
×
  • 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.