-
Posts
1,285 -
Joined
-
Last visited
Never
Everything posted by ohdang888
-
by be a problem thats not in your code. might be a port problem. I'm not a php expert, but thats my guess.
-
i only use sessions, and those work fine for me.
-
uh... I'm just a intermidate php person, so i'm not for sure on this... But it seems like you'de be albe to do this using php dates. it's be really complicated, but idk. maybe not. Ya, a html redirect would work fine. Why do you want the page to display when it will be refreshed? yOU could just put, "this page will refresh in 10 seconds"
-
so the info put in on 1 field, would join together with info from anyother field? try: $x = $text_1.$drop_down; of course, change the variables to what the GET is.
-
is this something you will be calling on a number of pages, and you want to be able to change 1 file when you make a change rather than lots? then just use php inlcude <?php include("file.php");?>
-
do you have session_start before the session destory? post some code.
-
From the code below, i am getting this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''1' = 0 WHERE `id`='5'' at line 1 whats wrong with my query? BTW, in this case, $field = 1 if($action = 'deny'){ mysql_connect("localhost", "root", "pancakes1") or die(mysql_error()); mysql_select_db("members") or die(mysql_error()); mysql_query("UPDATE `friend_requests` SET '{$field}' = 0 WHERE `id`='{$id}' ") or die(mysql_error()); Echo 'Friend Request Successfully Denied'; }
-
exactly! i can't seem to figure out how it works. The message table must be like 200 columns big!
-
roughly how would one go about creating a "add as friend" and "message this person" options... tips or tutorials??? i already have user system with profiles, but i can't figure out how "add as friend" would work...
-
How to select data from mysql db using php regardless of case?
ohdang888 replied to willc's topic in PHP Coding Help
is "WHERE" case sensitive? -
for example when they log in, i use this: $_SESSION['id']=$id; and the $id is their user id. then to verify they have logged in, you can do this: (this is if they are not logged in) if(strlen($_SESSION['id']) == 0){ echo "<meta http-equiv='refresh' content='0;url=login.php'>"; die(); }
-
yes, require them to login by using a variable stored during login.
-
echo $GET['source']; that is also doing nothing, it must be higher up.
-
where is info in sessions stored? on my server, or their computer?
-
whats better to do?? save a lot of info (about 10-15 things) into a session, or to use a query to get that info each time (there are about 5 pages where there would be used)
-
its still not working. but what does return data mean?
-
when i echo $new, nothing comes up, so "1" isn't even stored in it. what wrong with my the grabbing part of my code then?
-
ok i'm having a problem with this.... the page is "edit_settings.php?source=1" this is where the problem is: function sql_quote($data) { if (get_magic_quotes_gpc()) { $data = stripslashes($data); } return addslashes($data); } $id = $_SESSION['id']; $new = sql_quote($GET['source']); if ($new == 1){ echo 'You have successfully reigstered!'; echo '<br>'; echo '<font size=6>'; echo 'IMPORTANT: Please take a moment to review your profile settings.'; } but the "you have registersed" and "take a moment" is not showing up at all. whats wrong? Any help is greatly appreciated! thanks.
-
i find PHP and MYSQL most useful
-
nvm. Solved it. thanks,
-
<?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <BODY bgcolor="#666666"> <body leftmargin="0"> <body topmargin="0"> <font size=1> <Br> <Br> <center> <font size=3> <div style="background-color:#C0C0C0;overflow: hidden; width:920px;height:100%"> <Center> <table> <tr><td> <div style="width:908px"> <div id="leftColumn" style="float:left; width:173px;"> <Br> <IMG SRC="../thegameking.jpg" WIDTH="173" HEIGHT="49" BORDER="0" ALT="TheGameKing.Net - Free Online Gaming, Games"> <font size=2><center> <?php if(strlen($_SESSION['id']) == 0){ echo '<A HREF="login.php" style="color:black">Login</a> | <A HREF="register.php" style="color:black">Register</A>'; } else { echo '<A HREF="member_home.php" style="color:black">MyHome</A> | <A HREF="logout.php" style="color:black">LogOut</A> '; }?> </div> thanks for helping!
-
one question.... i have <?php session_start(); ?> on the "topmenu.php" which is included on every single page. but on the first page i am going to (the homepage) i am getting this error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\index.php:2) in C:\xampp\htdocs\include\topmenu.php on line 1 I'm logged out, and cleared all cookies and data in my IE, but its still doing that error whats wrong? P.S.- thanks for helping me!
-
awesome! thanks for helping dude! one more question. i have <?php session_start(); ?> on the "topmenu.php" which is included on every single page. but on the first page i am going to (the homepage) i am getting this error: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\index.php:2) in C:\xampp\htdocs\include\topmenu.php on line 1 I'm logged out, and cleared all cookies and data in my IE, but its still doing that error whats wrong? P.S.- thanks for helping me!
-
ok. i have that solved now. thanks BUT. i don't want to start a session for poeople not logged in. This is what my site is like... non-members can access: games, cannot leave comments home page contact pages members can access everything nonmembers can, plus: member profile pages member home page they can leave comments on games etc. Soooo..... i'm confused about the session_start on every page, Won't that start a session for people who aren't logged in??... Or does that not matter, becasue then the ID number stored in a member session won't be there????????
-
this forum isn't for us to create it for you. If you want someone to do that for you, hire them.