-
Posts
1,033 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
Not necessarily. There should be a segmentation fault number (e.g. segmentation fault (11)).
-
Yes. There is also access.log but that probably won't help much.
-
Just use += (for PHP 5.4+). $_SESSION['users']+=["boss"=>$row["bossid"]]; For 5.3- $_SESSION['users']+=array("boss"=>$row["bossid"]);
-
Did you check the httpd log?
-
Assuming PHP 5.3 or better and db date is in the format Y-m-d. $fromdb=new DateTime($datefromdb); $today=new DateTime(); $diff=$fromdb-$today; print("Difference is ".$diff.d." days); Note the result can be negative days.
-
Thanks. Makes no sense to me. It is inconsistent with other special characters.
-
I have an HTML input tag that can contain spaces. When I read the 'post' data the spaces are changed to '+' rather than '%20'. I run that data through Python 3 'unquote' and all the special characters are converted as appropriate. I suppose I can replace the '+' with a space but that raises 2 questions: 1. Why is the space not sent as '%20'? 2. How do I tell the difference between '+' as a space and '+' as a character in the string? TIA.
-
What editor? I just use 'vim' to edit /etc/php.d/php.ini.
-
Did you try increasing the memory limit anyway? I always set mine to 1024M.
-
Since none of us are clairvoyant, as far as I know, it might help if you posted your code. Be sure to use the code icon (<>) and select PHP.
-
How to SESSION get information from the database
gw1500se replied to hain's topic in PHP Coding Help
Did you move the session start to before the include as I originally suggested? The next step is to include a print of $_SESSION at the end of the script that sets that variable to make sure it is set at the end of that script and again after the session start of the script that uses it. That will determine if the variable is being reset somewhere in the first script or in the 2nd before it is used. This assumes there are no intervening scripts you didn't mention that can mess it up. -
How to SESSION get information from the database
gw1500se replied to hain's topic in PHP Coding Help
Not specifically based on what you have posted. At this point we can only tell you that the session variable is not set at the point you are trying to use it. If you don't want tell us the error you are getting or any details then there is little else we can do. -
How to SESSION get information from the database
gw1500se replied to hain's topic in PHP Coding Help
What do you mean "it didn't work?" What was the error? You need to provide more detail about what you are getting for us to help you. -
How to SESSION get information from the database
gw1500se replied to hain's topic in PHP Coding Help
Why use another variable at all? Use $_SESSION['Role'] directly. In any case do you do any error checking after the query to make sure the data is returned to set it in the first place? -
username as comment message author - Help Me Please
gw1500se replied to Jordanxl's topic in PHP Coding Help
The error message is quite clear. You are not setting 'user_id' in the session variable at least in that case. Where is the code that sets that variable. If you printed $_SESSION, like I suggested, you would see the problem. -
How to SESSION get information from the database
gw1500se replied to hain's topic in PHP Coding Help
session_start is not first in process.php. -
username as comment message author - Help Me Please
gw1500se replied to Jordanxl's topic in PHP Coding Help
What is the error? Are you setting that session variable correctly? Did you output $_SESSION to make sure it is what you expect? echo "<pre>"; print_r($_SESSION); echo "</pre>"; -
username as comment message author - Help Me Please
gw1500se replied to Jordanxl's topic in PHP Coding Help
Perhaps I do not understand what you want but why does using $_SESSION['user_id'] not work? -
parse-error with a 4 liner : unexpected syntax
gw1500se replied to dil_bert's topic in PHP Coding Help
It seems pretty obvious to me. In 2 places you have 'text]'. -
Don't give the same name to every button. Create an array of buttons then check which one was selected when you process the submit. i=0; while($row = $result->fetch_assoc()) { echo "id: " . $row["id"]. " - Name: " . $row["firstname"]. " " . $row["comment"]. "<br>"; echo "<input type='submit' name='button[i++]' />" ;
-
I don't think that would cause a syntax error. We need to see the preceding code.
-
You are getting that error because the syntax of something previous is wrong.
-
Combobox show information selected from database
gw1500se replied to ciresuark's topic in PHP Coding Help
If you looked for an error you won't find it. I meant look at the generated HTML source and see if the structure and data for the option box is there and correct. If it is not, you should be able to see what was built and what is missing/wrong. -
Combobox show information selected from database
gw1500se replied to ciresuark's topic in PHP Coding Help
Did you look at the resulting page source to check for any HTML errors?