Jump to content

idevlabsdotcom

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

idevlabsdotcom's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. it should work fine. this code outputs "WOOT": <?php $test = new bar("WOOT"); class foo { var $test; function foo($test){ $this->test = $test; } function print_object(){ echo $this->test; } } class bar { var $object; function bar($test){ $this->object = new foo($test); $this->object->print_object(); } } ?> post your code so we can give you some guidance.
  2. you could echo a javascript redirect along with some text that says to click if they are not automatically redirected.
  3. that includes using html before you use php. the following will throw an error: <html> <body> This is outputting text! Now I can't use a header call! <?php header("Location: www.yoursite.com"); ?> </body> </html>
  4. no, the script that is running periodically to log people out if they are inactive will only need to check those that are already online. there's no point in trying to log someone off that's already offline.
  5. possibly javascript. php is server side, and has no idea what is happening on the user's end unless it is sent something. i don't do javascript though, so someone else is going to have to chime in. the only way to do it purely in php would be to save a timestamp when someone logs in, and if their session has been inactive for X number of minutes then flag them as logged out. this script would likely be set up to run every X minutes with cron, and will likely hit your database more times than it is worth. it won't have anything to do with the window closing though. if you're interested in this method, a helpful tutorial can be found over at codewalkers.com: http://codewalkers.com/tutorials/14/1.html
  6. It has been coming up blank for the last 3-4 hours for me, but the forum works fine. Just wanted to make sure admin is aware.
  7. that's because you never execute the query or echo anything. if you're using MySQL for example, you would have to add: $result = mysql_query($query_rsSearchList); then you'd have to output the results: while($row = mysql_fetch_assoc($result)){ echo $row['colname1'] . " " . $row['colname2'] . "" . $row['colname3'] . "<br>"; } and replace the colname stuff with the names of the columns in your table. also you're going to have problems with your SQL most likely. try changing it to: $query_rsSearchList = "SELECT * FROM name WHERE name1 LIKE '$colname%' ORDER BY name1 ASC "; where id=id isn't going to do anything unless you have a column named id, and you have the string "id" in it for some bizarre reason. but even then you would need it to read: where id='id' also I don't get the point of that preg_replace()...
  8. Generally speaking that means you don't have PHP installed on your server.
  9. just let the database handle assigning a unique key by setting the field option to auto_increment. there's no reason for you to mess with the key yourself in this particular situation.
  10. if(substr($result, 0, 1) == "a"){ //result starts with the letter a } or you could use regular expressions: if(eregi("^a", $result)){ //result starts with the letter a }
  11. <?php //install.php $step = $_GET['step']; if($step == 1){ //include file here }elseif($step == 2){ //include file here }else{ //display default stuff here } ?> but your link would have to be: install.php?step=1 it's an oversimplification, but it should give you an idea of where to start.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.