-
Posts
16,734 -
Joined
-
Last visited
-
Days Won
9
Everything posted by PFMaBiSmAd
-
You already have a thread for this, where someone replied how you could get the files displayed in the order that you want them to be - http://www.phpfreaks.com/forums/php-coding-help/switch-to-unix-causes-dir-php-problems/
-
It's more likely that your code is putting an address into the From: mail header that is not an email address hosted at your sending mail server. For example, you are putting the email address that someone entered in a form into the From: address. Could you post the code you are using.
-
^^^ Something at or up to line 3 in that file is sending output to the browser. Also, read the following post as to why the code you are putting on each page is out of date and is not secure - http://www.phpfreaks.com/forums/php-coding-help/forms-gone-crazy/msg1510368/#msg1510368
-
http://www.phpmyedit.org/
-
Define: no results? What exact output are you getting and if you are getting a blank page what does a 'view source' in your browser show?
-
I'm going to guess that you are including a file using a URL and are expecting to get the php code and php variables from that file into the current program, but are actually getting just the output from that file. Post a complete set of code that produces/reproduces the problem so that someone can get the big picture of what you are doing. Just posting the bits and pieces as you have been in this thread doesn't provide enough information to help you. If you are using a URL somewhere in your code and you don't want to post the actual URL, xxxxx it out, but don't change any of the actual syntax you are using in your code.
-
And if you want to know which gd version and what image types are supported you can use gd_info.
-
Flash Builder -- PhP -- MySQL: UTF8 encoding
PFMaBiSmAd replied to Wimmerke's topic in PHP Coding Help
SET NAMES UTF8 is an actual mysql query that you need to execute separately from your other queries (you can also use mysqli_set_charset().) Since the complete query is under your control, there's no point in using prepared statements to execute it. You can use mysqli_query(). It would actually be best to do this right after you make the connection to the database server. -
Best guess is that whatever class $ezdb is an instance of, does not contain a method named quick_insert()
-
If you set error_reporting to E_ALL and display_errors to ON in your master php.ini so that all the errors that php finds will be reported and displayed, php will help you find problems like the $_POST['dob'] variable that does not exist. You will save a TON of time.
-
Your most immediate problem is that $_POST['dob'] is not the variable that contains the date. $dob is the variable you should be putting into the $session->register() statement. You should also be using the version of your code with the -'s in it, because the day and month values don't have leading zeros and the - characters are need in the format to eliminate the ambiguity in the values.
-
You probably have a fatal parse error and your code is not even being executed. The quickest way of getting a solution as to why your code for a page doesn't work, would be to post your code for that page. xxxxx out any sensitive information, but post all the code needed to produce the page.
-
If you set error_reporting to E_ALL and display_errors to ON in your master php.ini so that all the errors that php finds will be reported and displayed, php will help you find problems like that.
-
magic_quotes_gpc just won't shut off
PFMaBiSmAd replied to Pikachu2000's topic in PHP Installation and Configuration
I suspect it is a file system owner/permission problem with the php.ini file and the owner that the web server/php is running under cannot read the php.ini or perhaps the folder it is in. -
magic_quotes_gpc just won't shut off
PFMaBiSmAd replied to Pikachu2000's topic in PHP Installation and Configuration
Does changing any other setting in that php.ini have an affect, such as magic_quotes_runtime ? I would completely retype the magic_quotes_gpc line and try, in turn, 0 (zero) and off (all lowercase) as values. It's acting like it does not see the setting because it thinks something is wrong with the syntax and it is using the default/built-in value. -
Because you are unconditionally echoing the mysql_error() value, the error message that you see can actually be due to a previous failed query in your code and not necessarily the query immediately before where you echo it.
-
Is your table name actually table as that is a reserved keyword and would break the syntax of your query.
-
Unless $thephoto contains a URL where the image is actually stored at, that code would not work and doesn't do what someone took the time to explain and post a link to information about.
-
While this might not be directly related to your problem(s), the following code has two problems - session_start(); if(!session_is_registered(username)){ header("location:/admin/index.php"); } session_is_registered() was depreciated over 8 years ago, in favor of using the $_SESSION array, finally throws a depreciated error in php5.3, and will be completely removed in the next major release of php. You also need an exit; statement after your header() redirect to prevent the remainder of the code on your 'protected' pages from executing while the browser is performing the redirect. All someone needs to do is ignore the redirect being sent to the browser and he can access your protected pages. The following is the updated code - session_start(); if(!isset($_SESSION['username'])){ header("location:/admin/index.php"); exit; // prevent access to all the rest of the code on the page }
-
There's no point in having a form just to select the edit function. You are not using it for any user entered input (forms are for getting some kind of user determined input values.) Just make the <a href=""></a> a link to your edittask.php page with a GET parameter on the end of the url that indicates which $rid you want to edit.
-
It's not working because your first form on the page - <form action="deletetask.php" method="POST"> does not have a closing </form> tag, resulting in invalid HTML.
-
Each image on a web page requires an <img src="URL_that_results_in_an_image_being_output" alt=""> tag - http://w3schools.com/html/html_images.asp The URL_that_results_in_an_image_being_output that you put into the src="..." attribute would be a URL to your .php file that outputs the correct Content-type: header followed by the binary image data of the correct image. Since you would want to use the same .php file to output any of your images, you would need to use a GET parameter on the end of the URL that specifies which image to output, something like - <img src="image.php?id=some_image_id" alt=""> On your web page you would produce an <img> tag like above for each image. In the image.php code you would access $_GET['id'] to find out which image data to retrieve from the database. You then ouput the correct Content-type: header that matches your image type and then output the binary image data.
-
i posted earlier about < & > in mysql querys? extra help please..
PFMaBiSmAd replied to dbradbury's topic in MySQL Help
See the Per-connection time zones information at this link - http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html -
Escaping apostrophe using PHP/MSSQL and ODBC
PFMaBiSmAd replied to Eiolon's topic in PHP Coding Help
In mssql you escape a single-quote using another single-quote.