fugix
-
Posts
1,483 -
Joined
-
Last visited
Posts posted by fugix
-
-
Apologies.
Always use long tags..
My team of developers work on our servers with short tags enabled.
George.
not a problem at all...most people dont have them enabled, so just to avoid further errors...anyway jmahdi what do you receive when you try to echo $_SESSION['valid_user']; in your footer?
-
since this hasnt been answered yet...i looked around a little and found something that seems similar to your problem...try looking here
-
Set the session at the top of the webpage before the <html> tag.
For example
<? //Start Sessions session_start(); //Set Session $_SESSION['valid_user'] = "john.doe"; //Assign Session to Variable $username = $_SESSION['valid_user']; ?> <html> <head> </head> <body> <!-- RUN CHECKS HERE, for example --> <? mysql_query("SELECT * FROM credit WHERE username='$username'"); ?> <!-- END --> <!-- FOOTER HERE --> <? echo "You are logged in as $username"; ?> </body> </html>
That is how I do it most of the time. But set the sessions in an external document and call that into the current HTML page above the HTML tag to stop you having to change each individual file where a change is needed.
Like this :
<? include_once "./includes/scripts/sessions.inc.php"; ?> <html> <head></head> <body></body> </html>
Did this help?
George.
exept get into the habit of using long tags...<?php
-
you could store the information inside of a database...and have a field with the date that you want the information to expire..then write a script to delete that row when the current date is equal to the date that you have stored
-
it's impossabe to tell from the information given if the sequencing is off on entry or return. MySQL does not automaticly return information in a set order, you need to use the "order by" clause for that - Try appending ORDER BY id at the end of the SELECT query and see what happens.
if that is what his table looks like then the data is being inserted that way...I had a similar problem before but it was due to the fact that i thought that I had auto-increment on when in fact i didnt..this has me confused
-
Hmmm.........
My Decoration Day was superb, what about yours ?
was great...at the park all day in 95 degree weather...ahhhhh
-
callate la boca?
no...voca
-
welcome to the both of you
-
Hey everyone, just wanted to say hello and good day. I am from North America continent and I like to program in PHP. I play starcraft II for fun, and like girls.. anything else just ask (:
welcome to phpf
-
Did you double check that it is auto increment? If you add 5 or so items into your table does it still jumble the id?
-
Looks to me like you don't have it set to auto-increment. ?
-
Lol. Salathe you're a funny guy. In my original post I was simply trying to correct his if statement.
Trying, and failing.
:'(
-
Yocan assign a button to run code when clicked. Using a delete clause found http://dev.mysql.com/doc/refman/5.0/en/delete.html
-
too many innuendo-istic responses, none of which are really that funny.
Callate la voca
-
You will need to process the user data and insert it into your db using an insert clause
-
I don't fully understand the question. But if you are trying to create unique rows. You can add an Id field and set it to auto-increment primary key
-
Example.
body {background-image:url('paper.gif');}
-
if($var = null) ?
No matter what the value of $var is, that will return TRUE.
Correction: no matter what the value of $var is, that will return FALSE. *stalks*
Lol. Salathe you're a funny guy. In my original post I was simply trying to correct his if statement.
-
if($var = null) ?
No matter what the value of $var is, that will return TRUE.
stalker?
-
if($var = null) ?
-
why dont you use the html code for +
+
-
semicolon instead of comma to end the line...
var b = document.getElementById('clickme'),
yep, you are never actually ending your var definition
-
you will need to use one set and seperat the column name with commas...check here for correct syntax
-
what are you trying to set $tagArray to exactly here?
Store Shopping Cart Information - Session vs. Cookies
in PHP Coding Help
Posted
right, and upon the destruction of the cookie after 2 weeks...simply set a delete clause to delete the row where the information is stored