-
Posts
1,842 -
Joined
-
Last visited
Posts posted by marcus
-
-
You could just use date.
Say you only wanted it to show between X:20 and X:30
$minute = date("i"); if($minute >= 20 && $minute <= 30){ //show whatever }
-
1. Why do you have (int) in your $londonclub variable
2. Add an or die statemeont on your second result [before the //good to go! comment]
3. Why waste space, just use mysql_fetch_assoc($result)
-
-
What is that supposed to do?
Fatal error: Cannot instantiate non-existent class: ziparchive in /home/neoblob/public_html/hypertext/pref.php on line 2
-
Dev-Tuts.com isn't mine, it's what I previously designed for them.
Eh, I could care less about the flash activation.
But, I'd rather appreciate if my original question was answered
-
Is it possible to use PHP to extract ONLY the files names from a ZIP file?
-
-
What corbin did you can just do:
<form name="submit" method="post" action="page.php" onSubmit="Submitted(submit)"> <textarea name="textbox" cols="30" rows="14"></textarea> <br><input type="submit" value="Submit"> </form>
-
-
Use the checkbox [2nd try] and just pass it, then use foreach.
$tblname = $_POST['tablename']; foreach($tblname AS $woah){ echo $woah . "<br />\n"; }
-
Fill in your own stuff:
<?php function checkLogIn(){ if(isset($_SESSION[email]) && isset($_SESSION[password])){ if(LogIn($_SESSION[email],$_SESSION[password])){ return true; }else{ return false; } }else{ return false; } } function LogIn($email,$pass){ $email = mysql_real_escape_string($email); $pass = mysql_real_escape_string($pass); if($email && $pass){ //email and password are set $sql = "SELECT * FROM `yourtable` WHERE `email`='$email'"; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) > 0){ //email exists $sql = "SELECT * FROM `yourtable` WHERE `email`='$email' AND `password`='$pass'"; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) > 0){ //success logged in }else { //failure: email and password combination are incorrect } }else { //failure: email does not exist } }else { //failure: email/pass is/are not set } } $logged_in = checkLogIn(); ?>
-
-
You could have a field in a mySQL database that updates everytime a user views a page, then just have a page that selects the data from your database where the time field is less than 15 minutes
-
$path = "/home/path/to/your/folder"; $handle = @opendir($path) or die("Unable to open $path"); echo "<table border=0 cellspacing=3 cellpadding=3>\n"; $x=1; echo "<tr>\n"; while($file = readdir($handle)){ echo "<td><img src=\"$file\"></td>\n"; if($x == 5){ echo "</tr><tr>\n"; $x=0; } $x++; } echo "</tr>\n"; echo "</table>\n"; closedir($handle);
-
http://www.unixgeeks.org/security/newbie/unix/cron-1.html
or if you have access to a cPanel, you can use the Cron Tab Manager
-
$fetch = "SELECT `password` FROM `tbl_users` WHERE (username='$username1')"; $password2 = mysql_query($fetch); if($password == $password2) {
CHANGE TO:
$fetch = "SELECT `password` FROM `tbl_users` WHERE `username` ='$username1'"; $pass2 = mysql_query($fetch) or die(mysql_error()); $pfet = mysql_fetch_assoc($pass2); $password2 = $pfet['password']; if($password == $password2){
-
You would have to give "$array" a field parameter to work.
WHERE y IN($array[x])
-
If you're holding the user logged in, in a session you could just do:
if($_SESSION['name']){ //show stuff logged in }else { //show you need to be logged in to view this }
-
I'm still getting the wrong image. I'm trying to get image "6", but I keep getting "4"
I also believe that the variable is NOT passing threw the username function.
I've tried returning the username value inside the function but it's blank.
-
I don't want the braces, and the variable inside the username function is not passing correctly.
Username function does: [puts image on administrative level][link to profile]
I'm getting:
[frozenpic][link to profile]
Therefore the username isn't in existence.
-
I'm trying to make it so:
[profile=username] replaces with username(username)
username() is a function I have that links the "username" to that profile
$string = "[profile=marcus;]"; echo "Before: $string<br>\n"; echo "After: "; echo preg_replace("[profile=(.*?);]",username("\\1"),$string);
I get:
Before: [profile=marcus;]
After: [marcus]
The after statement is producing a link to that profile with an image. The image identifies the user's level, the link is correct.
How would I remove the brackets on the start and the end of "[marcus]" ?
-
They opened their function twice:
function quadratic ($a, $b, $c, $root) { {
That's what he was referring to in his first post.
-
You could do something like, updating a time column for each time they navigate around the site. And if there is no activity within 5 minutes, delete them from the table.
-
Remove the double quotes in your values.
Retrieving checkbox values from database
in PHP Coding Help
Posted
The [] in list will tell the script [when passed] that, that variable is an array.