Jump to content

DoddsAntS

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by DoddsAntS

  1. have a try of the following <?php $day=date("j"); $sql="SELECT * FROM invoices WHERE day='$day'"; $query=mysql_query($sql) or die($sql.mysql_error()); if(mysql_num_rows($query) > 0) { while ($req=mysql_fetch_array($query)) { if(mail($req['UserEmail'], "You must pay for protection.", "You haven't paid for protection. You have one day to pay or god may strike down your building.")) { echo "Sent email to {$req['UserEmail']}\n<br />\n"; } else { echo "Failed to send email to {$req['UserEmail']}\n<br />\n"; } } } else { echo "No results!"; } ?> Regards, A
  2. The connect function in the mysql class doesn't return any value so the line $mysql->connect() or die("error" . mysql_error()); is the reason, the connect function already has error handling in it so why add this when calling the connect function ? if you remove the or die(...blah..) from the above line it should be fine, alternately you could rewite the connect function so it returns a value
  3. Hi, The code that you first posted contains the call to the mail function, is that page called online_application_confirmation.php ? You mentioned that the page redirects to a confirmation page which is the code snippet above ? this page does not have any call to the mail function in it The way your doing error checking to see if the mail has been sent in the first page is incorrect. Possible solutions to your problem are to. 1. move the call to the mail function to the page online_application_confirmation.php this should send the email out to you if it's configured correctly 2. change the form action to be the page the form is on and then do a redirect after the mail function call (on a successful mail out or show the form again) Regards, A
  4. you haven't closed while block in the accept case
  5. there is an error in the following line. <form class="appnitro" enctype="multipart/form-data" action="<?php echo htmlentities($_SERVER['PHP_SELF');?>" name="addVideoGameForm" method="post" > it should be <form class="appnitro" enctype="multipart/form-data" action="<?php echo htmlentities($_SERVER['PHP_SELF']);?>" name="addVideoGameForm" method="post" >
  6. Hi, Try using the file system path to the file instead of the url to the file so replace http://hypboard.com/thehyp/generalnews.txt with /home/hypboard/public_html/thehyp/generalnews.txt
  7. the variables aren't accessible inside your login function. I would suggest moving the mysql_select_db outside of the function and passing the connection var as a function argument
  8. Hi, Just to add a bit of checking that would fill most situations Phone numbers may contain alternate characters so the is_numeric function will return false positives so I would use the following <td>Phone : </td><td><?php echo is_null($Num) ? 'N/A' : $Num;?></td>
  9. Hi, What are the field details for the mid field ?
  10. Hi, Have a look at the header() function A
  11. Hi, Here is one way 1. Read file 2. create an array for ids and for duped ids 3. Loop through ids 3a. Check to see if id is in array of id's if not add it if it is check to see if its in the duped id array if not add it 4. Echo out the ids from the duped id array Hope this helps a little
  12. Hi, Try something along the lines of SELECT * FROM table2 INNER JOIN table1 on table2.email=table1.email and take a look at Data Join Tutorial
  13. Hi, in the echo statments your using single quotes, this wont do the variable substitution you want so use the following instead <?php echo "<img src='http://www.domain.com/images/{$file}'>"; ?> or <?php echo "<img src=\"http://www.domain.com/images/{$file}\">"; ?> or <?php echo "<img src='http://www.domain.com/images/" . $file . "'>"; ?> A
  14. Hi, you could try removing the $ from the front of the dtae function, that may help A
  15. Hi, Here are a few things for you to think about if you click 4 check boxes your ONOFF array will look like this ONOFF[0] = 1 ONOFF[1] = 1 ONOFF[2] = 1 ONOFF[3] = 1 This is why the system is setting the first x records to be 1 where x is the number of boxes you check. Any records that you have been set to on previously will stay as 1 I would recommend setting the value to be the id of the record you want to update as you only have an on or off value for the field. A
  16. Hi, Take another look at the substr() function specifically the 3rd parameter A
  17. hi, try if(isset($_POST['submit']) || (isset($_POST['submit_x']) && isset($_POST['submit_y']))) { //your code }
  18. Opera sends the x/y coords of the image that you clicked so you'll need to either add a check for $_POST['submit_x'] and or $_POST['submit_y']
  19. Almost, something like $time = date("Y-m-d H:i:s", strtotime("-2 mins")); will give you the correct format for the timestamp
  20. okay, take a look at mktime() function strotime() function date() function you want to make a time stamp that is x mins in the past and check for lastactive times greater than that, you'll need to format the timestamp so it displays like the mysql timestamp.
  21. Do the filtering in the query, that way you dont have to loop through all the rows, are you using a unixtime stamp or a date/time stamp ?
  22. Hi, Add some filtering to your query (Where clause). if you have any issues post again but try first
  23. Hi, Have a look at the strtotime() function use this in the where clause of your query, and for formatting the date have a look at the date() function A
×
×
  • 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.