Jump to content

litebearer

Members
  • Posts

    2,356
  • Joined

  • Last visited

About litebearer

  • Birthday 01/13/1946

Contact Methods

  • Website URL
    http://nstoia.com

Profile Information

  • Gender
    Not Telling
  • Location
    white lake michigan

litebearer's Achievements

Member

Member (2/5)

5

Reputation

  1. Thought from left field... If the blob is just text (ie no special characters/formatting/etc), perhaps as a test write it to a file, then (a) attach file to email and (b) read file into a new variable and insert that into the email.
  2. You are still 'dividing" your text strings --'".$firstname/$lastname."', '".$day/$month/$year."', To join strings use the . (period on your keyboard) - $firstname = "Fred"; $lastname = "Flintstone" $fullname = $firstname . " " . $lastname; echo $fullname; // would display Fred Flintstone (note the space we added between the names $fulldate = $day . "/" . $month . "/" . $year; Also, you might look into date options for your database; using datetime might end up a better choice depending upon what you anticipate doing with its values. And, it might be a good practice to put your queries into a string, it makes it easier to test if the values are what you expect. And, (lots of ands LOL), you should validate your form data.
  3. Just a couple of thoughts... 1. why haven't you tested? 2. I belive you mean to increment $start to 10 in your while loop rather than $finish (as $finish is already set to 10)
  4. Perhaps... new_start_time would be LATEST start time of the three new_end_time would be EARlIEST end time of the three those two would be the common intersection/duration of the three (would apply to more or less time sequences)
  5. 1. what error(s) are you getting? 2. please show your db.php sans username/password
  6. Consider using with cyberRobot's answer
  7. Have you asked your client for more detailed criticism?
  8. The following script will display a tables structure as well as its contents... <?php /* this small script can be used to (a) get and display a table's structure (field names and field type) (b) get and display the field contents in an html table */ /* set the database connection variables */ $database=""; $location = ""; $username = ""; $password = ""; $db_table = ""; /* set the function switches 0 means use 1 means do NOT use */ $display_table_structure = 0; $display_table_contents = 0; $csv_name = $db_table . "_" . time(); $how_many = 0; /* use this value to limit the number of records returned in the data query (0 means no limit) */ /* Start Defining the function(s) */ /* This function gets the field names */ function my_db_get_table_field_names($table) { $sql = "SHOW COLUMNS FROM `$table`"; $field_names = array(); $result2 = mysql_query($sql); for($i=0;$i<mysql_num_rows($result2);$i++){ $row = mysql_fetch_array($result2); $name = $row['Field']; array_push($field_names, $name); } return $field_names; } /* connect to the database */ mysql_connect ($location, $username, $password); mysql_select_db($database) or die( "Unable to select database"); $result0 = mysql_query("SHOW COLUMNS FROM $db_table"); if (!$result0) { echo 'Could not run query: ' . mysql_error(); exit; } /* get the field names into an array and count them */ $new_array = my_db_get_table_field_names($db_table); $fields = count($new_array); /* get all the data and count the records */ if ($how_many == 0) { $result = mysql_query( "SELECT * FROM $db_table" ) or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); }else{ $result = mysql_query( "SELECT * FROM $db_table LIMIT $how_many" ) or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); } /* display the general information */ echo "This information is for the " . $database . " database. Table " . $db_table . "<br><br>"; echo "There are " . $fields . " columns/fields and " . $num_rows . " records.<br><br>"; /* display the table structure */ if ($display_table_structure == 0) { echo "<hr>Table structure for " . $db_table . ": <br><br>"; echo "<table border=1> <tr><td>Field #</td><td>Field Name</td><td>Field Type</td></tr>"; $result9 = mysql_query("SHOW FIELDS FROM $database.$db_table"); $i = 0; while ($row = mysql_fetch_array($result9)){ echo "<tr><td>" . $i . "</td><td>" . $row['Field'] . "</td><td>" . $row['Type'] . "</td></tr>"; $i = $i +1; } echo "</table>"; } /* display the table contents */ if ($display_table_contents == 0) { echo "<hr>Table data for " . $db_table . ": <br><br>"; echo "<table width='100%' border=1>\n"; $i = 0; echo "<tr>\n"; for ($i=0;$i<$fields;$i++) { echo "\t<td><font face=arial size=1/>$new_array[$i]</font></td>\n"; } while ($get_info = mysql_fetch_row($result)){ echo "<tr>\n"; foreach ($get_info as $field) echo "\t<td><font face=arial size=1/>$field</font></td>\n"; echo "</tr>\n"; } echo "</table>\n"; } ?>
  9. you need to loop thru the table read here - http://www.tutorialspoint.com/php/mysql_select_php.htm
  10. What have you tried and what errors are you getting?
  11. Effectively, you are placing an <option></option> within an option. Your while loop should begin immediately after your opening select and end immediately prior to your closing select. If you look closely at your browser source you should see what is happening
  12. Have you tried it? if so, what error(s) did you incur?
  13. compare your two query strings closely. Do you see ALL the differences?
  14. What have you tried thus far and what error(s) are you getting?
  15. did you change the form? this site has good tutorials to learn how to query a db table http://www.tizag.com (re: your user_info and movie_info lines)
×
×
  • 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.