Jump to content

BlueSkyIS

Members
  • Posts

    4,268
  • Joined

  • Last visited

Everything posted by BlueSkyIS

  1. i think you mean array_unique(). i don't see it used in your code.
  2. 'a' is true. concatenating false to the string doesn't change that. what are you trying to do?
  3. i mean echo the value of $filename to see if it is a valid path to a file.
  4. the value in the database is probably really 34.549999237061, regardless of what you see in phpmyadmin. you can use money_format() or number_format() to display the value with only 2 decimal places.
  5. if you want to REMOVE the first element and use it, array_shift() http://php.net/manual/en/function.array-shift.php $some_array = array('a', 'b', 'c'); $some_val = array_shift($some_array); echo "some_val: $some_val"; // output: a print_r($some_array); // output: b, c
  6. probably somewhere above /home/username/public_html/col/proc1.php if you can navigate to the location via command line, you can use the command pwd to 'print the working directory', or the absolute path to where you are.
  7. before looping over the results a second time: mysql_data_seek($rsSchools,0); // reset pointer to first data element
  8. many shared hosting plans allow you to place your own php.ini within the web server root. the secondary option is usually to use .htaccess, often appropriate if your PHP is running as cgi.
  9. this is because each time the function is called, it is 'reborn' with the reset array. this could be avoided by setting the array outside of the function and making it global inside the function... sort of making the function pointless.
  10. after a quick read through, i have a couple thoughts/options: 1. instead of removing elements from the array, have a value to indicate whether they have been 'taken from the deck' or not. maybe initialize the array like so: cards = array("Ah"=>0, "Ac"=>0, etc... then update value to 1 when card is 'taken'. 2. or randomize the deck array and use array_pop() or array_shift() to pull a card off of the end of the array. /end 2 pennies.
  11. because you do this once, before doing it again within a loop: $row_sales_shipping_tax = mysql_fetch_assoc($sales_shipping_tax); // pull off first row of data // ... then later while ($row_sales_shipping_tax = mysql_fetch_assoc($sales_shipping_tax)){ // starts with second row
  12. build a basic form in HTML to post those values to the PHP script to see if the PHP works.
  13. obviously, there is no record in the table login_details WHERE username='Mat' AND password='pie' Perhaps there is a difference in capitalization or spelling, or there is additional space(s) on the values in the table.
  14. if the report needs to be formatted consistently when printed, you might want to consider output to PDF.
  15. if ($row_sales_shipping_tax['cdate'] >= $date1 && $row_sales_shipping_tax['cdate'] <=$date2 ) {
  16. echo the SQL so we can see what's wrong with it.
  17. i suspect page2.php is using javascript to make sure it's inside a frame. but can't tell without seeing it.
  18. this line causes the (assumed object) $result to be overwritten with $result->fetch_assoc(), so the next loop $result is no longer an object. while($result = $result->fetch_assoc()){ // $result is no longer the object $result. Now it is the array fetch_assoc() you need to use a different variable name for $result.
  19. that is not posting. that is GET'ing
  20. echo echo echo. echo values to see what they are. echo $_POST['email'] to make sure it's what you expect. after $check = "select id from users where email = '$email'"; echo $check to see if it's what you expect. if mysqli_num_rows($check_result) <1 echo mysqli_num_rows($check_result) to see if it's what you expect. basic debugging is called for!
×
×
  • 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.