-
Posts
16,734 -
Joined
-
Last visited
-
Days Won
9
Everything posted by PFMaBiSmAd
-
It would help if you posted the error, because it probably tells you where your code is sending some output at, that is preventing the header() from working.
-
You are missing a semi-colon ; on the end of one of the lines of code. You should be developing 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.
-
You are putting double-quotes inside of a php double-quoted string and probably getting a php parse/syntax error if full php error_reporting/display_errors were turned on.
-
Is your live server also a Windows server and using the same php version as where your code does not work, because php.net has had a lot of bugs concerning resolving include/require paths and getting the _once versions to see the correct files. Do you have more than one class.my-sql.php file present in other folders? Does this work if you just use require() and not the _once version? What is your core_dir value?
-
If the code is actually attempting to save the new product information, it would be stored wherever the store_product() function is storing products at. Have you checked wherever that might be - database/flatfile?
-
Did you read the documentation for html_entity_decode(). It tells you what a is converted to -
-
Have you done anything to troubleshoot if the session id has the same value on the www. page that it has on the page where it was set? For all we can tell, you don't have a session_start() statement on the www. page and the session does not exist or you are changing the path of the page and the session.cookie_path is not set to '/' so that it would match any path other then where the session id cookie is being set.
-
The From: email address must be a valid mail box at the sending mail server. You are putting the visitors entered email in as the From: address. Put a valid email box at the sending mail server in as the From: address and put the visitors entered email address in as a Reply-to: address.
-
It's more likely that the difference in the two date formats is in the year field. Could you post an example showing the two different values. You have one line of code with 'y' (lowercase) and one with 'Y' (uppercase.) Everything is significant in programming, even a lowercase/uppercase letter in a format parameter.
-
http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html
-
postman, the function in your code, register_variables(), has little or nothing to do with register_globals and the link you posted. Your register_variables() function likely validates and extracts the supplied list of named variables out of the $_POST array, but that is just a guess. Without the relevant parts of your script, it will be virtually impossible for anyone to remotely help you. You have not really provided much useful information in this thread. For example, what is the name and version of this script (in case someone who reads this thread has it or knows its' inner workings)? Is the operation you attempted something the script normally does, but it failed for some specific data you tried? Has the operation you attempted worked before and if so, what was different about the data you just attempted to use vs what you used before? Where there any errors (did you check the web server error log for relevant errors as well)? At the point where the data should have showed up, was there any difference at all in the output? .... i.e. supply some helpful information that would allow someone to help you with your problem.
-
Changing a variable for every item in a MySQL Table
PFMaBiSmAd replied to kyles0623's topic in PHP Coding Help
You already have one thread for this problem, is there some reasons you started a second thread? -
Are any functions disabled in the master php.ini, such as ini_set() or mail()?
-
LOL. No, databases don't do things like that. They only do exactly what you tell them to do and you must always check that you have configured something the way you want or that your data is actually what you expect, especially when your code that is dependent on that data does not do what you expect. From my signature:
-
What does using var_dump($row['altPhoto']); right before the if() statement show?
-
INSERT INTO dosn't work with IE, Opera or Maxthon.
PFMaBiSmAd replied to loozah's topic in PHP Coding Help
You can use images as submit buttons in forms so that they will work in all browsers, you must simply use the _x or _y variables that the HTML specification states are to be submitted - http://us3.php.net/manual/en/faq.html.php#faq.html.form-image -
Your mysql_num_rows($result); statement is not using the correct variable that the result of $query = mysql_query(....); was assigned to.
-
MarcusZ, the whole point of functions is you can write any code using local variables inside the function that you need to accomplish the task you have designed that function to do, without needing to worry or keep track of what the main program is doing. The last thing you want in a 1000 line program that is using dozens of functions is to need to keep track of and keep separate all the variables that are being used inside of and outside of functions and to rewrite function definitions just because you happen to be using the same name variable or parameter in more than one function. So, no the main program variables are not automatically available inside functions and you are supposed to pass any values into a function as parameter(s) when you call the function. You are also supposed to return the value that the function produced to be used or assigned in the main code. Doing the above allows you to write and test a function once, then use it in any code needing that function without needing to keep track of what variables are being used inside the function(s) in your code or rewriting functions just to change the name of variables to avoid conflict in larger programs.
-
INSERT INTO dosn't work with IE, Opera or Maxthon.
PFMaBiSmAd replied to loozah's topic in PHP Coding Help
The HTML of your form is probably invalid and the browsers where it happens to work, are probably ignoring the markup errors. -
You also need to use $escaped_username in the query instead of $username
-
Then your session id IS being propagated between pages by the browser using a cookie and in order for it to match all variations of your domain, you will need to get the ini_set("session.cookie_domain", ".stephanddarryn.com"); to work. You must set the session.cookie_domain before every session_start() statement. It is best to globally set it in the master php.ini (when you have access to the master php.ini), in a local php,ini (when php is running as a CGI application), in a .htaccess file (when php is running as an Apache Module), or finally in your script if you don't have access to any of the other methods.
-
That's a session variable, not the session id that I asked about. Do you in fact know how the session id is being propagated between pages by the browser on your system? Do your links contain something that looks like this - http://your_doamin.com/your_file.php?PHPSESSID=son0gdkjfmahc6ve52l0l65mn6
-
How do you know you are not using cookies to pass the session id?
-
You need to set the session.cookie-domain to .stephanddarryn.com Ref: http://us2.php.net/manual/en/session.configuration.php#ini.session.cookie-domain