Jump to content

Altrozero

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

About Altrozero

  • Birthday 07/24/1989

Profile Information

  • Gender
    Male
  • Location
    United Kingdom, Sunderland

Altrozero's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I haven't read the whole script but one problem appears to be that you are checking bytes and calling them kb. $_FILES["photo"]["size"] < 10000 will check that it is less than (roughly) 10kb not 10,000kb
  2. Use javascript or save previous input to either a database or a users session/cookie. There are a few tutorials around to save data.
  3. The line seems fine, are you sure there is data in $row['user_id']? Could it by null?
  4. I thought that is what you wanted? You haven't really explained what the output should look like? Depending on the users input.
  5. Hidden input fields could be used instead if you really wanted. you could go in your HTML <form method="post" action=""> <input type="hidden" value="value1" name="one" /> <input type="hidden" value="value2" name="two" /> <input type="hidden" value="value3" name="three" /> <input type="hidden" value="value4" name="four" /><input type="submit" value="submit" /> </form>
  6. Not pretty, but it works. for ($m = 1; $m <= 12; $m++) { $use = $m; if($m < 10) $use = '0'.$m; echo $use; }
  7. Try updating your version of PHP? I believe there is a current bug open on this error. http://bugs.php.net/bug.php?id=31037
  8. You're welcome
  9. In your if statement you need to use a double == sign e.g if($pin == "1111") { } else if ($pin == "2222") { }
  10. This should work if(empty(trim($value)) { //Made up of just white spaces } else { //Has other content }
  11. In this case you can use something like this. Not exactly fast but a simple way of doing it in just msql UPDATE results, (SELECT id, (SELECT tb2.result FROM results as tb2 WHERE tb2.new_id = tb1.new_id ORDER BY result ASC LIMIT 1) as result FROM results as tb1) as tb3 SET results.final_result = tb3.result WHERE results.id = tb3.id
  12. Just the rest of your code, I basically replaced the line if ($phase = mysql_result(mysql_query("SELECT `phase` FROM `as_support` WHERE `mission` = '$var2'"),0,0)) with what I posted. It should stop giving you the warning then.
  13. Do that outside of regular expressions with the function nl2br(); $string = nl2br($string);
  14. Good good Try this article for securing your code http://www.tizag.com/mysqlTutorial/mysql-php-sql-injection.php
  15. It probably means that the row and field you are requesting doesn't exist, in other words when no rows are found in your query, mysql_result can't get anything. You can solve this my going... $phase = false; $query_result = mysql_query("SELECT `phase` FROM `as_support` WHERE `mission` = '$var2'"); if(mysql_num_rows($query_result) > 0) $phase = mysql_result($query_result, 0, 0); if($phase !== false) { ....
×
×
  • 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.