gple
Members-
Posts
166 -
Joined
-
Last visited
Everything posted by gple
-
how do i redirect page within an if/else statement
-
that works, now from the same variable $date1 = '2010-11-06 22:02:04'; how do I pull the time as 10:02:04 PM
-
$date1 = '2010-11-06 22:02:04'; $date2=date("Y-m-d", $date1); echo $date2; this is displaying 1969-12-31
-
$date2=date("Y-m-d", $date1); echo $date2; this keeps displaying 1969-12-31
-
$date=2010-11-01 23:45:09 How do I create one variable to output Monday November 1 and another variable to display 11:45:09 PM from the above variable.
-
for some reason this keeps failing. any idea why?
-
$query="select * from table where id=''" what can I make id equal to so tha I can display anything. I dont want to write a separate sql statement for when id has a value and when it doesnt have a value.
-
Warning: Unknown: open(/var/php_sessions/sess_65c14600a0956bafb072cfbd009fc3b2, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/php_sessions) in Unknown on line 0
-
I have created a session on one of my pages and then when i go to check the session on another page it doesnt exist. At no point in my code do I kill the session.
-
I am building a user forum for the very first time and I am just trying to get a feel on what is the best way to handle it. After user logs in, what is the best way to go from page to page? do you store a cookie and validate against that or is there some other way to handle this?
-
How do I find the next saturday from now using the date function?
-
nevermind, i should always look over what I post before I do. sorry
-
$schedule=mysql_query("select * from schedule where date>'2009-09-01' and division='1' and ((team1='$team1' and team2='team2') or (team1='$team2' and team2='$team1'))"); does not output anything
-
how do i assign a different variable through each for loop for ($i=0;$i<10;$i++) { $variable.$i="test"; } echo $variable0; how would I output Test?
-
does this look right? for ($i=0;$i<$teams_num;$i++) { $team=mysql_result($teams,$i,'team'); $array.$i[0]=$team; } i want to create 1 array for each record.
-
is there anyway to put this back the other way. There are too many pages with too many variables to go in and change them.
-
All of a sudden, my If else statement still goes into the wrong the nest. for istance if ($enter==0) {echo "hello";} else if ($enter==1) {echo "Goodbye";} else{} even when i go to the link index.php?enter=1, it still outputs HELLO. this just started to happen after a year of working without a problem. Any ideas or is anyone else experiencing this.
-
I have a text box with a default value. Part of my script is that when I remove the default value from the text box and hit enter on the form. it passes the variable of that text box as blank. When I run an if statement for that value if ($text==NULL) {echo "success";} else {echo "failed";} I am always getting failed.
-
something screwed up with my db structure. got it now. thanks
-
if(mysql_query("Insert into players (fname, lname, address, city, state, zip, phone, dob, gender, type1, type2, type3, type4) values ('$fname', '$lname', '$address', '$city', 'NY', '$zip', '$phone', '$dob', '$gender', '$type1', '$type2', '$type3' , '$type4' )")) {echo "success";} else {echo "failed";} any idea why this would be failing
-
anyone have an idea? i have never had this problem before
-
$query=mysql_query("SELECT * FROM players, communities, divisions WHERE dob BETWEEN '{$start_date}' AND '{$end_date}' and communities.id=players.community order by communities.community, communities.church, lname, fname"); when I output the names from the players table. I am getting four duplicate records.
-
i have a variable of time $time="13:30:00" how do i add 1 hour and 15 minutes to this.
-
figured it out.