
grlayouts
Members-
Posts
342 -
Joined
-
Last visited
Everything posted by grlayouts
-
i see it as pointless the code is working but okay. Login form. <form name="login" class="login" method="post" action="login.php"> <label>Username</label> <input type="text" name="user" size="20" maxlength="20" style="width:148px; height:16px;" /><br/><br/> <label>Password</label> <input type="password" name="pass" size="20" maxlength="20" style="width:148px; height:16px;" /><br/> <input name="submit" type="submit" value="Login" class="submit" /> </form> login.php <?php include("config.php"); session_start(); ?> <?php if (!$user || !$pass) { include("head2.php"); print "Please fill out all fields."; exit; } include("header1.php"); $logres = mysql_num_rows(mysql_query("select * from players where user='$user' and pass='$pass'")); $stat = mysql_fetch_array(mysql_query("select * from players where user='$user' and pass='$pass'")); if ($logres <= 0) { ; exit; } else { session_register("user"); session_register("pass"); } $unixtime = time(); $b = date("g:i a d-m-Y",$unixtime); $ip = " $_SERVER[REMOTE_ADDR] "; mysql_query("update players set ip='$ip' where id=$stat[id]"); mysql_query("update players set lastonline='$b' where id=$stat[id]"); mysql_query("update players set logins=logins+1 where id=$stat[id]"); ?> blah blah page so on!!!
-
Hi, I have a login on www.ycreate.com which was working on another cpanel server. recently i changed host and now when i've uploaded the files no one can log in as the session seems to fail.. I beleive this to be server side but my host state it's not can someone try it and give advice on what they need to activate for it to work username: testaccount password:test website: www.ycreate.com I can provide the code if required.
-
I dont want to do it that way.
-
I am looking at doing 2 things with my site: I am trying to add social bookmarking to my users blog section. Digg, Del.ic.ious, Technorati, ect. with their logo. Where users can click the icon and sumbit the blog to these I know how to do this with html, but my blogs page is done in php Any tips, where to start, what do you need from me I am pretty sure I am editing the correct bit of code to add the social bookmarking features, but everytime I get an error saying the header information has already been sent. And the social bookmarks end up in the header existing code $_ni = $_page['name_index']; $_page_cont[$_ni]['page_main_code'] = PageCompBlogs(); $_page['extra_js'] = $oTemplConfig -> sTinyMceEditorJS; $_page['header'] = $oBlogs->GetHeaderString(); $_page['header_text'] = $oBlogs->GetHeaderString(); function PageCompBlogs() { global $site; global $date_format; global $oBlogs; $sRetHtml = ''; $sRetHtml .= $oBlogs->GenCommandForms(); This is what I am adding to the code $tag = "Connection Square User Blog"; $tag = urlencode($tag); $url = "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; $url = urlencode($url); echo <<<EOD <a href="http://www.socialize-it.com/index.php?url=$url&tag=$tag">Automatic Social Bookmarking<br> <img src="http://www.socialize-it.com/socializeit.png" alt="socialize it"></a> EOD;
-
TABLE ONE attack who type unit amount 427 12406 3 0 3237705 TABLE TWO id username handle 12406 megb tnuKapuS hi i have two tables. what i want is it to order it by the highest ammount in table one then print out that ammount but match the 'who' in table 1 to 'id' in table two and print that.. so like most: 3237705 user megb.
-
can anyone understand why row[1] comes out the highest amount but row[0] just shows a random user.handle just picks a random user and not the one assigned as attackdetails.who with the ammount. ie attack who type unit amount 1 10730 3 0 91431 user 10730 is BOB but it displays another users name as row[0] $sql = "SELECT users.handle,max(attackdetails.amount) FROM users,attackdetails WHERE users.id=attackdetails.who AND attackdetails.type=4 GROUP BY type"; $r = mysql_query($sql); $row = mysql_fetch_row($r); tableEntry(array('Most Supply Stations Won in an Attack', $row[0], number_format($row[1])), 'align="center"'); endTable();
-
fair enough. but it picks up the row[2] fine? can you suggest how i would get the person in the (attackdetails) to show if they had the most of type 4?
-
why? it inserts ok! it displays the correct record for the number just not the right user under $row[0] so why would you need the insert?
-
i have a code which takes the records from the database and displays the highest record. now its for a product called supply stations. however when someone new sets the record the record changes but the user remains the same.. any idea's what wrong with my code? $sql = "SELECT users.handle,max(attackdetails.amount) FROM users,attackdetails WHERE users.id=attackdetails.who AND attackdetails.type=4 GROUP BY type"; $r = mysql_query($sql); $row = mysql_fetch_row($r); print"$row[0]"; tableEntry(array('Most Supply Stations Won in an Attack', $row[0], number_format($row[1])), 'align="center"');
-
problem is not your code i would suggest email provider?
-
something simple would be like take away timenow from time logged in then do a simple if time <300 print user.
-
well if goback is a browser backlink to previous page didnt it come from admin.php? if not provide full code.
-
hi, i have a chat box just a sim php one with the code <input name="submit2" type="submit" value="Say it!" /> <?php if ($action == postmsg) { if (empty ($chat)) { print "Duh... fill out all fields."; exit; } mysql_query("insert into tagboard (name, comments, date) values('$stat[user]','$chat',now())") or die("Could not add updates."); } ?> because this is on my main page alot of people hit f5 to reload and it posts the message again. is there any way to chnage the code so that you cant post the same message twice?
-
hi, i have a chat box just a sim php one with the code <input name="submit2" type="submit" value="Say it!" /> <?php if ($action == postmsg) { if (empty ($chat)) { print "Duh... fill out all fields."; exit; } mysql_query("insert into tagboard (name, comments, date) values('$stat[user]','$chat',now())") or die("Could not add updates."); } ?> because this is on my main page alot of people hit f5 to reload and it posts the message again. is there any way to chnage the code so that you cant post the same message twice?
-
wonder if it would work with days.
-
that the full code? ???
-
never mind im an idiot global $pr; because its outside.. thanks guys.
-
i have a query that wont add.. $pr = mysql_fetch_array(mysql_query("SELECT boost FROM boosts;")); function price ($q) { if ($q > 1000000) return 25; return ceil($q * -275 / 1000000 + 750) +$pr[boost]; everything a part from the last bit +$pr[boost]; adds together. when i print $pr[boosts] i get the correct 50. but it wont add. any idea's?
-
it will.. change the printsomething to what you want to show. to what field you want to show.
-
i dont know.. what do you want to print. print"$querycol[printsomething]";
-
try this $querycol = mysql_fetch_array(mysql_query("SELECT * FROM credit_customers;")); $queryresult = mysql_query($querycol) or die("Query failed due to: " . mysql_error());
-
the part + $price[boost] is not updating but if i type print"$price[boost]"; it prints ok.