Jump to content

iversonm

Members
  • Posts

    195
  • Joined

  • Last visited

Everything posted by iversonm

  1. well see first your replacing your data in your array for each row in your database. so the first row is $array['assigned'] and the second row replaces $array['assigned'] because its the same key in the array. you need to do something like this $array['assigned'][] so the rows stop replacing themselves in your array
  2. So what would I need to add if I want to allow numbers after the decimal to be as long as i want so 1.1 is valid but 1.11 is not
  3. assuming preg_match('#^-?[0-9.]+(?:[-+*/^](?:\(-[0-9.]+\)|[0-9.]+))*$#', $string) works for decimals then topic solved. you are my hero
  4. No ending delimiter '#' found i have no idea what that means
  5. Hey I am sure this is easy enough but I have made my attempts and failed so I come to the Gods of Regex! I want to only allow numbers 0-9 and + - * / and ^ any advice would be appreciated
  6. I find myself doing that to all the time. haha nice work. topic solved?
  7. What do you have so far? Are you going to be storing the people in database?
  8. by using implode it will no longer be an array and it wont have keys for each value. It'll be a long string. explode will turn it into an array.
  9. Can you post your insert querys? I am just curious because it seems more like a problem with that rather then your function you created which looks fine
  10. Also you should check out the second sticky in php coding help.
  11. Also I would just like to say you should read stickies. It specifically says do not title your posts as "help".
  12. iversonm

    lol

    Ahhh Clearly Genius hahaha
  13. Did you try google? the php manual is a great source for infomation. http://us3.php.net/manual/en/ref.image.php
  14. thorpe, you never have failed me. it worked exactly how I wanted to it to. Thankyou topic solved
  15. So i have a crontab scheduled to run every minute, the basic idea is i want it to run a php script that will clear inactive users from a table in a database on my website. so whenever it runs the crontab this is the email i get /var/www/vhosts/website/httpdocs/crontab/clearusers2.php: line 1: ?PHP: No such file or directory /var/www/vhosts/website/httpdocs/crontab/clearusers2.php: line 2: syntax error near unexpected token `'localhost',' /var/www/vhosts/website/httpdocs/crontab/clearusers2.php: line 2: `$Connection2=mysql_connect('localhost', '****', '***') or die(mysql_error());' So I am assuming its not running the php file, any ideas? Comments? Suggestions?
  16. I am still trying different methods but non have returned anything successful. I would appreciate some help or advice.
  17. public function Get_Photo_Key($UID, $PID, $AID){ $Photos=$this->Get_Photos($UID, $AID); $Current=reset($Photos); foreach($Photos as $Value){ if($Value[0]==$PID){ return array('Next'=>next($Current), 'Previous'=>prev($Current)); } $Current=next($Photos); } } And just so you know what the Get_Photos function is public function Get_Photos($UID, $AID){ global $Database; $Result=$Database->Get_Photos($UID, $AID); while ($Array[] = mysql_fetch_row ($Result)); return $Array; } $aid=album id $pid=picture id $uid=user id i want it to return the next id in order when calling the first function any ideas?
  18. no here http://www.flickr.com/groups/elephpants/ they are actual stuffed animals
  19. Does anyone know where I can get a php Elephpant? they are little blue elephants with the php logo on them and I really would like to get one. Anyone know anything at all??
  20. You need to always include the conditions in () and then the result {}, You can always add as many if statements as you want in any script. Here is the way your script should be written if ($p1=='on' && $p2==''){ $include = " AND points >= '$pointsmin'"; }else if ($p1=='' AND $p2=='on'){ $include = " AND points <= '$pointsmax'"; }else if ($p1=='on' AND $p2=='on'){ $include = " AND points BETWEEN '$pointsmin' AND '$pointsmax'"; }else if ($p1=='' AND $p2==''){ $include = ""; } if ($k =='on'){ $betweenclause = "x BETWEEN $xLow AND $xHigh AND y BETWEEN $yLow AND $yHigh"; }else if ($x=='on' AND $y==''){ $betweenclause = "x BETWEEN $x1 AND $x2"; }
  21. I like it alot, I don't think its too complex at least in my opinion. The only thing that I did not like was under free products they are not actually free. Maybe change the title to promotional products or special deals. I don't know what but they aren't free so it is misleading. Otherwise the site looks good.
  22. I find myself saying this more and more now but put error_reporting(E_ALL) At the beginning of your page. Do any errors show up?
  23. at the beggining of your script add this error_reporting(E_ALL) and let me know if any errors come up
  24. Well how I would go about it is have a start_time, last_active kind of set up. so when they log in or visit for the first time it records the time the session was started and this is nice so you know how long users stay on your website. then everytime they go to a new page you have a small piece of code update the last_active column. then when you use cron tab, just look for ones that are more the 30mins old. You just create a function to update the row you can relplace the ip with whatever makes the user unique $time=time(); $Query="UPDATE `table` SET `Time_Update`=$time WHERE `ip`=$IP"; Then if they are a new user you insert a new row instead of update the current one. Let me know if that works otherwise I can post more examples
×
×
  • 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.