-
Posts
2,527 -
Joined
-
Last visited
Everything posted by DeanWhitehouse
-
<?php if(isset($_POST['submit'])) { $id = mysql_real_escape_string($_POST['id']); $row = mysql_fetch_assoc(mysql_query("SELECT * FROM database WHERE studentid = '{$id}'")); echo $row['details']; exit(); } ?> <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post"> Student id:<input type="text" name="id"/> <input type="submit" name="submit" value="Go!"/> </form> simple , and needs tweaking to ure db
-
try google, and try the freelance section , this is for code help, we are not here to write the code for you.
-
please use tags and whats the question?
-
increase the amoun of characters, or the length of the area it's contained in?
-
what have u got so far?
-
you may be able to use GROUP BY, in the query to group all the same songs?
-
not sure if u can in php
-
[SOLVED] Need help adding PHP code in HTML table tag!!!
DeanWhitehouse replied to dauzy's topic in PHP Coding Help
echo '<td width="145px" height="145px" background="'.$something_real_good.'"'.$day_num.'</td>'; <--- this is where i need help. it's already in php tags, so this is wrong <?php $something_real_good ?> the above should work -
$_SERVER['HTTP_REFERER']; i think,test it
-
ok, thanks for all the help, i think it works now,
-
i think it works, not sure though
-
is this the correct thing $time = mktime(date("s"), date("i")-2, date("h"), date("m"), date("d"), date("Y")); $sql = "SELECT * FROM users WHERE lastactive >= '$time' LIMIT $offset, $rowsperpage"; $result = mysql_query($sql); // while there are rows to be fetched... while ($list = mysql_fetch_assoc($result)) { // echo data echo "<tr><td class='NormalContent' style='border:thin solid #AA4B00;'><a href='users.php?id=".$list['ID']."'>".$list['Username']."</a></td></tr>"; }
-
ok, still not sure how to do it, would i do something like this $date = date("hours,min,seconds");//odviously correct terms then, but something like this? $sql = "SELECT * FROM users WHERE lastactive <= '$date' LIMIT $offset, $rowsperpage"; $result = mysql_query($sql); // while there are rows to be fetched... while ($list = mysql_fetch_assoc($result)) { // echo data echo "<tr><td class='NormalContent' style='border:thin solid #AA4B00;'><a href='users.php?id=".$list['ID']."'>".$list['Username']."</a></td></tr>"; }
-
this is the main part of the code <?php $sql = "SELECT * FROM users WHERE lastactive = '???' LIMIT $offset, $rowsperpage"; $result = mysql_query($sql); // while there are rows to be fetched... while ($list = mysql_fetch_assoc($result)) { if($list['lastactive'] date // echo data echo "<tr><td class='NormalContent' style='border:thin solid #AA4B00;'><a href='users.php?id=".$list['ID']."'>".$list['Username']."</a></td></tr>"; } // end while ?> timestamp is a mysql one. displayed as 2008-07-15 04:32:21
-
ok, i judst had an idea to do it, need some help with logic though i am going to get the timestamp from the db, then do if($timestamp <= date("") - 2) { } would that work, and what would i do in the date ? do i need to convert the time stamp fisrt?
-
im not sure how to do it , but u could pull the data then do the if statement to work out how old they are?
-
[SOLVED] php mail goes to inbox as a .dat file
DeanWhitehouse replied to jesushax's topic in PHP Coding Help
works fine in windows live mail, i think it is ure server config for outlook, -
how can i check to see if they have be inactive for more than two minutes, using a mysql timestamp as the time?
-
cant u just make sure that the pplz entering the username and password enter it lowercase?
-
[SOLVED] php mail goes to inbox as a .dat file
DeanWhitehouse replied to jesushax's topic in PHP Coding Help
send one to me deanwhitehouse6@hotmail.com -
going to go with DoddsAntS idea. i have got the db table to use a timestamp, now how can i check how long ago they where active?
-
would it work if i just check for a cookie, with out a short timeout , that is set on everypage?
-
when ure addin them to the db , are u converting them to lowercase?