Jump to content

shino

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

shino's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Try instead: $postcodearray[$n] = $postcode;
  2. Like this? $string = implode(':', $arr2); echo $string;
  3. The closest I was able to get was to ask them to print and they click yes and it prints, but that was via adobe livecycle pdf. I know there are scripts and codes but it requires other things, which I wasn't sure to understand. Here this is where I saw the discussion: http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=12622
  4. Try this in another php file on it's own and send it a ?id=1000 or something in the url: <?php echo $_GET['id'].'<br />'; echo $id.'<br />'; ?> It should only echo once, if you see it twice then register globals is on and you need to disable it with your host.
  5. would be easier if you posted your whole code. Also, could be if your using $do somewhere and register globals is on that it's overwriting it.
  6. Maybe something like: <?php $query='select * from table where id='.(is_numeric($id) ? $id:'"" OR 1=1'); ?>
  7. You can use array_keys(); http://php.net/manual/en/function.array-keys.php $keys = implode(',',array_keys($data));
  8. You could do <?php extract(getTrophy($id, 'Posts', 'account')); ?>
  9. In your while it should be $result in the function and not $sql. Have you tried this?
  10. Based on my previous response, here is what i've added. You just add an INNER JOIN with your current_employees table, inner join basically returns a result when the table your joining it with matches so the ones that aren't in current_employees won't show up. <?php $query = "SELECT employees.* FROM employees INNER JOIN current_employees ON (employees.idnum = current_employees.idnum) LEFT JOIN shifts ON (employees.idnum = shifts.idnum) WHERE shifts.intime > shifts.outtime AND (SELECT COUNT(id) FROM projects WHERE idnum = shifts.idnum AND projStatus = 'Open' ORDER BY id DESC LIMIT 1) = 0"; $who = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($who)){ echo $row['MAX(fname)']. " - ".$row['lname']; echo "<br />"; } ?>
  11. Have you tried md5 without the crypt? An easy way would be to pick a password say: test, do md5('test'); then compare that result with the one from your code in your login sequence and see if it's identical, that way you can spot your problem.
  12. You could try maybe: <?php $url = "http://www.google.com/images?hl=en&source=imghp&q=whales&gbv=2&aq=f&aqi=g10&aql=&oq=&gs_rfai="; $str = file_get_contents($url); preg_match_all('/"http:\/\/t[0-9]\.gstatic.com\/images([^"]+)"/',$str,$matches); foreach( $matches[0] as $match ){ echo trim($match,'"').'<br />'; } ?>
  13. I would personally use is_file() instead of file_exists()
  14. You could try something like: $query = "SELECT employees.* FROM employees LEFT JOIN shifts ON (employees.idnum = shifts.idnum) WHERE shifts.intime > shifts.outtime AND (SELECT COUNT(id) FROM projects WHERE idnum = shifts.idnum AND projStatus = 'Open' ORDER BY id DESC LIMIT 1) = 0"; $who = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($who)){ echo $row['MAX(fname)']. " - ".$row['lname']; echo "<br />"; } That's if you have an id auto increment column in your projects table
  15. Thanks for your replies, now I just need to know what you guys think about handling errors like this. Have any of you done so, do you find it works well and makes the handling of errors more friendly to the users whom might experience them, what are your thoughts on this? You might take this in context versus a notice or warning appearing on very top of your browser page, or crashing the program itself with a blank page and some wierd error, etc.
×
×
  • 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.