Jump to content

PFMaBiSmAd

Staff Alumni
  • Posts

    16,734
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by PFMaBiSmAd

  1. Is the - LoadModule rewrite_module modules/mod_rewrite.so line in your httpd.conf uncommented?
  2. The use of a cookie simply with the value 1 in it to determine is someone is logged in is easy for a visitor to produce (early versions of phpbb and some other major php applications did things like that and people were becoming administrators to sites just by setting cookies and taking the sites over.) If you use a cookie it should only identify the visitor (not determine if he is logged in) and the value stored in the cookie should be a unique and hard to guess value created per visitor (see the uniqid function) and stored in the cookie and stored in your user table in your database to tie the visitor together with his record in the user table. To determine if someone is actually logged in, you must rely only on a value stored on the server, not the simple existence of a cookie with a easy to guess value in it.
  3. You need to use double-quotes around the \r\n Ref: http://www.php.net/manual/en/language.types.string.php
  4. You need to do this EVERYWHERE in your code - Also, your hidden form field is not named id (assuming the form in the code you posted is what you expect to be submitting to the code in question.)
  5. No one can really help you with what is specifically wrong with your code without seeing the code that produces the error. I told you what the error means, if you don't understand what the parameters are in a function call or where or if they are getting set to the correct values, you will need to post your code.
  6. The error is because your query failed due to an error. If you echo mysql_error(); on the next line after the line with your mysql_query() statement, it will tell you why.
  7. Php, despite being a loosely typed language, got loose comparisons with the number zero wrong. The external values you receive from post/get/cookies are all strings by definition. When you compare them with a number using a loose comparison (==, <, >) any string is equal to the number zero and your code is always matching the if($page==0) test. You need to put the numbers on the right-hand side of all of your comparisons (at least for the zero) inside of single-quotes if($page=='0')
  8. The second parameter in a mysql_query() function call is an optional mysql link resource. Your's is not one. You would need to troubleshoot why the second parameter you are supplying is not a mysql link resource and make it the one that your mysql_connect() created.
  9. Your white page is being caused by a fatal error. You should be learning php, developing php code, and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON in your master php.ini so that php will report and display all the errors it detects. You will save a ton of time. As to your database design and writing out all that repetitious code and data. Computers were designed to help with repetitive tasks. If you find yourself repeating line after line of code that only differs in the name of a variable or in the actual data value, you should be using a loop to simplify your code.
  10. Freid001, not only did you change the column name that was causing the first error, you put single-quotes around each of your column names. Why did you do that and if you bother to look at the error message you got, it is complaining at the first single-quote that you put around your ID column name.
  11. You are building the query incorrectly. The specific parts of the query must be in a certain order - http://www.phpfreaks.com/forums/index.php/topic,305028.msg1442575.html#msg1442575
  12. Please, just use an array - $item[1], $item[2], ... your code will be simpler and it will execute 3x faster than using the code needed to create a series of numbered variables.
  13. Your <input ... > tags need name="..." attributes that match the $_POST['...'] in order to set the post variables. These are some pretty basic concepts of forms. You did read through a tutorial before you attempted this?
  14. A) You didn't bother to post the code where the error is occurring, and B) Your code likely always contained this error but the error_reporting/display_errors settings where probably hiding the problem.
  15. ^^^ If you in fact have a column with a two word name, it requires special handling. You must enclose it in back-ticks `` every time you put it into a query. You could also rename it to use an under-score Fac_Name instead of a space so that it would become a one-word column name.
  16. The method=".." and action=".." attributes go into the <form ....> tag. They don't go into an <input ...> tag.
  17. If the actual image is stored in your database table, you must make a second .php script that outputs the correct content-type: header followed by the image data. You then put the URL of this second .php script into the src= "..." attribute of the <img src="..." alt=""> tag. The src= attribute is always a URL that results in an image being output. You would also need to store the correct content-type (image/jpg, image/gif, ... in your database table or use a lookup between the extension of the image and the content type. Most people use a GET parameter on the end of the URL to tell the .php script which image to output so that they can use the same .php script to output any of their stored images. Short-answer: You don't output the binary image data in the <img tag. The Internet and browsers don't work that way.
  18. You have an existing thread for this where someone asked you for further information. Please don't start more than one thread for the same problem.
  19. If you were developing and debugging php code on a system with error_reporting set to E_ALL and display_errors set to ON, php would help you find things like variable names that are different than what you are actually using because they would show up as undefined variable errors due to the name mismatch. You will save a ton of time.
  20. There's at least a dozen different ways that a web page could get replaced in whole or in part by the content in question. The exact method used to replace or alter the contents of a web page is what's important and it is not specific to any particular named 'hacked by' page.
  21. You generally use an ORDER BY column_name ASC/DESC term in your query so that the data is retrieved in the order that you want it.
  22. Ummm. The URL he posted in not the one HE is having a problem with.
  23. Then how do you know the actual site has a problem or how would anyone here be able to tell you anything specific about anything you are trying to find out about.
  24. $rows["CompletedIT"]; is not the same as $row[CompletedIT] What is your actual code that fetches the result from the query? You might want to reread the reply that Pikachu2000 made because using the mysql DATE_FORMAT() function directly in your query is both simpler and at least 8x faster than trying to do this using php code.
  25. You posted a lot of information, but the most important piece of information would have been the whole query that produce the error. You could then determine what was actually wrong with 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.