Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. The headers that script detects are only set by legitimate proxy servers (i.e. the proxy servers that want you to know they are proxy servers), such as a proxy server that a company would setup to serve as a gateway for all the internal lan connections. That script does not detect 'silent' web proxy servers that are used to make it appear that requests to your site are coming form different IP addresses.
  2. You still have 7 lines of HTML being output before the php code that performs the redirect - 1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2. <html xmlns="http://www.w3.org/1999/xhtml"> 3. <head> 4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5. <title>Untitled Document</title> 6. </head> 7. <?php
  3. Put the php code that determines if you are going to redirect at the top of the page.
  4. The URL you enter must include the .php part of the filename (unless you are doing so url rewriting that makes it unnecessary.)
  5. Either php is not installed/working or the file name being requested does not end in .php or the <?php opening tag is not being seen because it contains corrupted or a non-printing character(s).
  6. You cannot execute multiple queries separated by semi-colons using the mysql_query() function. Too many 'programmers' were not validating external data to prevent sql injection so the msyql_query() function does not support multiple sql statements. You either need to execute each query separately or you need to form a multi-value INSERT using a list of comma separated values.
  7. Setting those two values in your script has no effect on displaying fatal parse errors because your script is never executed to set those two values. You should be developing and debugging php code on a system where those two values are set in your master php.ini. Edit: Once you do that, you will find that your greater-than or equal comparisons using => should in fact be >=
  8. http://www.phpfreaks.com/forums/index.php/topic,290968.msg1377912.html#msg1377912
  9. Does the file name myfile have a .php extension so that it will be parsed by the php language engine?
  10. There are very few incompatible differences going from php4 to php5 (there's a list in the php.net documentation.) Most php4 code will work under php5, given the same php.ini configuration. Most problems are due to code that is not using the current recommend php.ini settings, in some cases features that were turned off almost 8 years ago (and which will be removed in php6.) The code you posted appears to be dependent on register_globals to 'magically' populate program variables from external (and session data if you were using them) data. In your case, the $_POST data from a form. Don't turn on register_globals (even if the web host permits it.) Now is the time to get the code up to current standards so that it will work under current and future php versions. You should be debugging your code on a system with error_reporting set to E_ALL and display_errors set to ON so that php will help you. You will get undefined errors for each variable that you need to set in your code. You are using $_POST['submit'] to detect if the form has been submitted. You need to use $_POST variables for all the other form fields.
  11. You are executing the query twice in your code, therefore you get two rows inserted - $add_member = mysql_query($insert); if (!mysql_query($insert,$con))
  12. Your problem is more serious than not being able to connect to the database. Your problem is that your php code is not being parsed as php code. Is the php language even installed on your server? What URL are you entering in your browser?
  13. Try using a full opening php tag <?php
  14. You just posted a question about the same error (the line number or the code it is occurring in makes no difference), were told why you were getting it, and were told how to find out what was causing it - http://www.phpfreaks.com/forums/index.php/topic,290968.msg1377912.html#msg1377912
  15. Since there is no built-in php function named redirect(), the posted php code would result in a fatal runtime error and would not display any portion of the code or content in that file.
  16. There is nothing in the posted code that is causing the symptom you mentioned. However, since that is not all the relevant code on the page, it is not directly possible to tell you what is wrong with it. Post the whole file, including the first opening php tag in the file.
  17. You are putting $userid, the result resource from the first query, into the second query statement. You would need to fetch data from the result set of the first query before you could put an actual value into the second query.
  18. Has any php code ever functioned on your server (i.e. fill us in on how you got to this point)?
  19. There is no such limit. You would need to be way more specific about what problem you are having and the code you are using.
  20. Your query failed, probably due to a syntax error in the SQL. If you echo mysql_error() as part of your error checking and error reporting logic in your code, you can usually find out why the query failed.
  21. It's likely that the query that is failing is the following one and that $squadronID does not contain anything - $sql = "UPDATE pilots SET squadronID = $squadronID WHERE pilotID= $pilotID"; You should echo out the failed query in your error reporting logic so that you can see if it is what you expect.
  22. connection (the part of the query displayed in the error for the right syntax to use near '....) has special meaning and would need to be enclosed in back-ticks in a query or renamed to something else.
  23. Not if your column is defined correctly.
  24. The php5.3 native driver is just the driver. You still need to enable the mysql or mysqli extension.
  25. Based on where the error is occurring at (i.e. the part of the query that is printed in the error message), the problem is in the $racetime value. Assuming that the column receiving that value is either a TIME or a character data type, you need to put single quotes around the value in the query.
×
×
  • 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.