Jump to content

gple

Members
  • Posts

    166
  • Joined

  • Last visited

Everything posted by gple

  1. gple

    redirect

    how do i redirect page within an if/else statement
  2. 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
  3. $date1 = '2010-11-06 22:02:04'; $date2=date("Y-m-d", $date1); echo $date2; this is displaying 1969-12-31
  4. $date2=date("Y-m-d", $date1); echo $date2; this keeps displaying 1969-12-31
  5. $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.
  6. for some reason this keeps failing. any idea why?
  7. $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.
  8. 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
  9. 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.
  10. 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?
  11. How do I find the next saturday from now using the date function?
  12. nevermind, i should always look over what I post before I do. sorry
  13. $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
  14. 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?
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. something screwed up with my db structure. got it now. thanks
  20. 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
  21. anyone have an idea? i have never had this problem before
  22. $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.
  23. i have a variable of time $time="13:30:00" how do i add 1 hour and 15 minutes to this.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.