Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. or even 110% into 11 Oh and my 2pence UPDATE table SET column = CAST(column AS SIGNED)
  2. Simple option is use frames, other options is uses sessions, you basically control everything via a session instead of GET's, But if you are having problems with bandwidth or too many users this is of course one way to make people leave your site as it will stress out members as their bookmarks become pointless and their was no reason for it in the first place.. Oh and lets not forget the hell behind the code and management.. As you may of guessed i don't recommend this approach, may i ask why, do you want to do this!
  3. its called HTTP_REFERER but its set via the browser so isn't idea but it works! here some common stuff $referrer = $_SERVER['HTTP_REFERER']; $browser = $_SERVER['HTTP_USER_AGENT']; $ipAddress = $_SERVER['REMOTE_ADDR']; print "Referrer = " . $referrer . "<BR>"; print "Browser = " . $browser . "<BR>"; print "IP Adress = " . $ipAddress;
  4. Okey heres what you was doing wrong <?php $Directory = fopen("directory.txt", "r"); //$records[] = fgets($Directory); //this would read the line into an array while (!feof($Directory)) { $records = fgets($Directory); //read line $row = explode(",",$records); foreach ($row as $field) { echo "$field"; } } fclose($Directory); ?> untested code (for table) <?php $Directory = fopen("directory.txt", "r"); //$records[] = fgets($Directory); //this would read the line into an array echo "<table width=\"100%\" border=\"1\">"; while (!feof($Directory)) { $records = fgets($Directory); //read line #$row = explode(",",$records); //fancy trick /*i am replacing , with </td><td> and adding <td> at the start and </td> at the end*/ echo "<tr>"; echo "<td>".str_replace(",","</td><td>",$records)."</td>"; echo "</tr>"; } echo "</table>"; fclose($Directory); ?>
  5. as a guess i would say remove the -r but it depends on the command, check the docs or use ZipArchive (see PHP manual)
  6. $Mamount isn't being used in this code but let assume you mean $_POST['Mamount'] Erm... but $_POST['Mamount'] < $gang['money'] means if $_POST['Mamount'] is less then $gang['money'] report and error BUT you are say it should be the other away around! Which you did test here doesn't make any sense as for it to get here it must fail! as condition! if (isset($_POST['Mamount']) && $_POST['Mamount'] >= $gang['money']) BUT theirs no point checking your same logic twice so just remove the incorrect one!
  7. The script is doing exactly what you programmed it to do! Thats really not that useful!
  8. i would assume their not getting sent!
  9. Was their a question ?
  10. I love it when they say thanks!
  11. I assume his talking about a ISAPI filter called mod_rewrite , if you have problems then check This is used with IIS.. and ASP(X), but i guess you could use it with PHP.. and you "could" likely use it with apache but .... yeah.. What are you using exactly ? windows 2003 PHP or ASP ? IIS or apache (i assume apache due the thread!)
  12. I said this code doesn't make sense! if (isset($_POST['Mamount']) >= $gang['money']) as joel24 pointed out with another line!
  13. fghmj ghsxbmvm, OUCH! just bowed back and smacked my head on the keyboard!
  14. Read back and learn how to fix it as its been explained already!
  15. I would still recommend you checking the other script and including the one with the correct funtion,, either that or add a comment saying this is a workaround or something If solved please click solved!
  16. you mean ONE of the fail safes failed! which would be this one if (isset($_POST['Mamount']) >= $gang['money'])
  17. Look at the cron that fails and look at the includes.. one of those likely has the fetch function or maybe try if (!function_exists('fetch')) { function fetch($SQL) { if(empty($SQL)) return false; $result = mysql_query($SQL); return (bool)(mysql_num_rows($result)>0); } }
  18. In that case the line thats causing the problem isn't that one did you change the other messages and update the $Mamount ?
  19. Erm... setup.php
  20. Well you have that exact message 3 times are adding numbers to them to workout the exact line also whats $_POST['Mamount'] & $gang['money'] set to ?
  21. Try this include(dirname(__FILE__).'/classes/clsMetaData.php');
  22. No its the isset else if (isset($_POST['Mamount']) < $gang['money']) should be else if (isset($_POST['Mamount']) && $_POST['Mamount'] < $gang['money']) EDIT: lol what joel24 said
  23. Who knows,, try adding this function fetch($SQL) { if(empty($SQL)) return false; $result = mysql_query($SQL); return (bool)(mysql_num_rows($result)>0); }
  24. your very welcome
  25. change <div class="input_row"><div class="input_titles">Description:<br /><br />(Use this space to add further descriptive text about this spare part e.g. dimensions etc.)</div><div class="input_box"><textarea name="descr" cols="50" rows="10" id="descr" type="text" value="<?php echo $descr; ?>"</textarea></div> to <div class="input_row"><div class="input_titles">Description:<br /><br />(Use this space to add further descriptive text about this spare part e.g. dimensions etc.)</div><div class="input_box"><textarea name="descr" cols="50" rows="10" id="descr" type="text" ><?php echo $descr; ?></textarea></div> as for the image.. try this <div class="input_row"><div class="input_titles">Select image:</div><div class="input_box"><input type = "file" name = "fupload"></div></div> to <?php if(empty($image)) { ?> <div class="input_row"><div class="input_titles">Select image:</div><div class="input_box"><input type = "file" name = "fupload"></div></div> <?php }else{ echo '<img src="'.$idir.$image.'">"; }
×
×
  • 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.