taith
Members-
Posts
1,514 -
Joined
-
Last visited
Everything posted by taith
-
yes, php would be what you would want to use for both the seperate logins, and the calendar...
-
sending automatically from one page to another? best to use $_SESSION's...
-
depends on your form... $_REQUEST holds both $_GET's data and $_POST's data so you can always access form data through $_REQUEST... now... on your <form method="post/get"> that determines how the form is sending the data to the next page... i use post, nearly always... now... after form is submited... you can access it through $_POST[fieldname];
-
trust me... you wouldnt want to refresh the page all the time... you'd want to use ajax&php for that...
-
(you just hit 3000 posts )
-
HAPPY 3000!!!! sorry... i'm done...
-
obviousally this will always return 0 minutes... but its only sleeping for 10 seconds...just pull time1 from the database... <? $time1=time(); sleep(10); $time2=time(); $dif=$time2-$time1; $min=0; while($div>=0){ $min++; $dif-=60; } echo "$min minutes ago" ?>
-
yup! you could have it as text or whatever you want, and it wont affect php atall... as long as its integers, its all good
-
change it from decimal, to text/varchar...
-
i've often wondered that... on the one i made, i used ajax, and told it to only grab the bottom 10~ posts, then have history...
-
if ya say so... might cause you some more problems in the long run... but... your choice :-) $allpictures=array(); function get_picture($title){ global $allpictures; if(!empty($allpictures[$title])) return $allpictures[$title]; $query=mysql_query("SELECT * FROM `pictures`"); while($row=mysql_fetch_assoc($query)){ $allpictures[$row[title]]=$row[url]; } return $allpictures[$title]; }
-
theres your problem... $vars are CaSe SpEcIfIc... you are $_GET['id']'ing in lowercase, and you link's ?ID='s are uppercase...
-
lol... i laughed
-
only idea i could think of, on login, have it add a row to a table with id, email, ip, timestamp... if its a different ip address(so you only get 1 for each ip&email)... that way theres no mistakes, and it doesnt require anybody to click on anything...
-
yup! get a less agressive antispam program
-
here... just activate this function... it'll change your servers default timezone :-) <?php function set_timezone($timezone="0"){ switch($timezone){ case "-12": date_default_timezone_set('Etc/GMT+12'); break; case "-11": date_default_timezone_set('Etc/GMT+11'); break; case "-10": date_default_timezone_set('Etc/GMT+10'); break; case "-9": date_default_timezone_set('Etc/GMT+9'); break; case "-8": date_default_timezone_set('Etc/GMT+8'); break; case "-7": date_default_timezone_set('Etc/GMT+7'); break; case "-6": date_default_timezone_set('Etc/GMT+6'); break; case "-6": date_default_timezone_set('Etc/GMT+5'); break; case "-4": date_default_timezone_set('Etc/GMT+4'); break; case "-3": date_default_timezone_set('Etc/GMT+3'); break; case "-2": date_default_timezone_set('Etc/GMT+2'); break; case "-1": date_default_timezone_set('Etc/GMT+1'); break; case "0": date_default_timezone_set('GMT'); break; case "1": date_default_timezone_set('Etc/GMT-1'); break; case "2": date_default_timezone_set('Etc/GMT-2'); break; case "3": date_default_timezone_set('Etc/GMT-3'); break; case "4": date_default_timezone_set('Etc/GMT-4'); break; case "5": date_default_timezone_set('Etc/GMT-5'); break; case "6": date_default_timezone_set('Etc/GMT-6'); break; case "7": date_default_timezone_set('Etc/GMT-7'); break; case "8": date_default_timezone_set('Etc/GMT-8'); break; case "9": date_default_timezone_set('Etc/GMT-9'); break; case "10": date_default_timezone_set('Etc/GMT-10'); break; case "11": date_default_timezone_set('Etc/GMT-11'); break; case "12": date_default_timezone_set('Etc/GMT-12'); break; } } set_timezone('-5'); ?>
-
you can do it that way... but i always prefer using id's for my indexes... doing them by name can be VERY tempermental... an example of one of my superfunctions... indexing pictures by `id`... first time its run, grabs all the information, puts it into the array, every next time, it just pulls from the array, only accesses database once $allpictures=array(); funcion get_pictures($id){ global $allpictures; if(!is_numeric($id)) return; if(!empty($allpictures[$id])) return $allpictures[id]; $query=mysql_query("SELECT * FROM `pictures`"); while($row=mysql_fetch_assoc($query)){ $allpictures[$row[id]]=$row[url]; } return $allpictures[$id]; }
-
<? include "connectdb.php"; if(is_numeric($_GET[id])){ $S2=mysql_query("SELECT * from movies where id='$_GET[id]' LIMIT 1"); $S3=mysql_fetch_array($S2); print "$S3[name]"; print "$S3[plot]"; }else{ $D2=mysql_query("SELECT * from movies"); while($D3=mysql_fetch_array($D2)){ print "<A href='index.php?ID=$D3[id]'>$D3[name]</a><br>"; } } ?>
-
then its not a matter of escaping the .'s... something else would be going on there...
-
escapes are \... not /
-
those are just comments... they dont affect anything... so if you really want/need to comment your files... for a changelog or whatallelse... go right ahead...
-
header("Cache-Control: no-store, no-cache, must-revalidate"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); there goes any/all forms of cache
-
well... it really depends on how much you know, and how much time you have... my first newsletter program was ROUGH! but 2-3 versions later, and some idea pointers from my designer... and thats quite a different story...
-
in the table, store the id of whoever made it, then on login, set $_SESSION[userid]=$row[id]; thats prolly the easiest way to verify, while not compromizing security that much...
-
[SOLVED] Current web page path stored in a session?
taith replied to suttercain's topic in PHP Coding Help
no prob :-) that one also saves $_GET[] querys... if you didnt catch that