Jump to content

ras1986

New Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by ras1986

  1. Would you mind posting the code for the full page? I tried the code you posted before and it works fine for me.
  2. Is your $counter incremented inside the while loop? Because I can't see a closing for the while loop. Make sure its inside the loop.
  3. I don't see a problem.. I've tried your code and it generates 5 columns just like you wanted..
  4. sorry.. my bad....
  5. is $uname containing string value? if yes, try '$uname'... and also try putting backslashes to your column name `uname`.... i faced this error before and this fixed it....
  6. what is is the value of $year... it seems like $year and $i has the same value... if $year is '2010', then try <form action="archivednews.php" method="post"> <select name="year" id="year"> <?PHP for($i='1986';$i<=date("Y");$i++){ if($year == $i) { echo "<option value='$i' selected>$i</option>"; } else { echo "<option value='$i'>$i</option>"; } } ?> </select> <input type="submit" value="GO"> </form>
  7. i found this by googling... not sure if this helps... For primitives just use (string)$var or print this variable straight away. PHP is dynamically typed language and variable will be casted to string on the fly. If you want to convert objects to strings you will need to define __toString() method that returns string. This method is forbidden to throw exceptions.
  8. you have error at your while()... try changing while ($orderitem = mysql_fetch_array($orderlist) ); ( $orderarray[] = $orderitem['id']; ) to this while ($orderitem = mysql_fetch_array($orderlist)){ $orderarray[] = $orderitem['id']; } you are closing the while loop before the $orderitem['id'] can be stored in $orderarray[]
  9. i think it's settype()
×
×
  • 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.