Jump to content

hansford

Members
  • Posts

    562
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by hansford

  1. now for the hard way lol $str="akjefln15789678sjengdk2345hmg"; $number = ""; for($i = 0; $i < strlen($str); $i++){ if(is_numeric($str[$i])){ $number .= $str[$i]; if(!is_numeric($str[$i + 1])){ break; } } }
  2. sorry, I'm use to writing jpeg images where the imagejpeg($im, $imgpath,100); The 100 is for the quality from 0-100 looking over the manual for png images I see there is a place for a 3rd argument which is quality but its for Compression level: from 0 (no compression) to 9.
  3. Ok, I had to run your code to see what you were seeing. 'smnith 12345' was indeed the result - in fact - the only result and not what we were expecting. I'm not a MYSQL expert, but removing 'ORDER BY id_incr DESC' from the query string will produce the correct results. comment out these echo statements as they confuse us as if they are the results -------------------------------------------------------------- echo '$mrn:' . $mrnstring . '<br/>'; echo '$patientstring:' . $patientstring . '<br/>'; echo '$fellowstring:' . $fellowstring . '<br/>'; -------------------------------------------- when echoing results -put more space between the $row_sql['mrn'] AND $row_sql['fellow'] columns
  4. post your code, changing your password of course.
  5. that's all the function does is print the information you want to get rid of, so just delete this line. return $response;
  6. ok - the super moderators answer so fast I didn't even have time to evaluate the code lol
  7. no - 'smnith', 12345, '06/01/08' will only be displayed if one of your variables contains 'smnith' or 12345 or '06/01/08' Make sure you don't have any other echos that are printing for testing purposes
  8. you have this in your table ----------------------------- 'smnith', 12345, '06/01/08' 'bobby', 1234, 'fellowbobby' 'ddd', 111, '06/01/08' 'dsad', 111 , '06/01/08' the statement ------------------ "SELECT * FROM active_consults WHERE mrn LIKE '$mrnstring' or patient_name LIKE '$patientstring' or fellow LIKE '$fellowstring'" the variable settings ------------------------ $mrnstring = 111; $patientstring = ""; $fellowstring = ""; return values ------------------------- 'ddd', 111, '06/01/08' 'dsad', 111 , '06/01/08' the variable settings ------------------------ $mrnstring = 111; $patientstring = "smnith"; $fellowstring = ""; return values ------------------ 'smnith', 12345, '06/01/08' 'ddd', 111, '06/01/08' 'dsad', 111 , '06/01/08'
  9. I'd be interested to see your database table in the SELECT statement your using OR which means match this or match that so if any of those conditions are true that emtire row will be grabbed
  10. this would be a problem with the SELECT statement; why are you using LIKE in the statement? if your looking for exact matches then use something like this: SELECT * FROM active_consults WHERE mrn = '$mrnstring' AND patient_name = '$patientstring' AND fellow = '$fellowstring'
  11. you'll have to start a session and then hold the value selected in a session variable like so $_SESSION['selection'] = "users selection";
  12. i'm not sure what the select boxes do, but there's probably a post method involved since they'd be attached to a form. When a user clicks a 'submit' button the $_POST variables will hold all the info from the select boxes. If you're wanting to know which form was submitted then you can just ad a value to the submit button. <form name='form1' method='post' action='processpage.php'> <input type='submit' name='itemtable' /> </form> then on the process page we do if(isset($_POST['itemtable'])){ } we now know which form was submitted. hope this helps.
  13. //first you need an image path and the filename you want to use $imgpath = "images/yourimagename.png"; //you may also get the path this way $imagename = "yourimagename.png"; $imgpath = $_SERVER['DOCUMENT_ROOT'] . "/images/" . $imagename; //second save the file to your chosen directory imagepng($im, $imgpath,100); I don't have an answer for your second question-sorry.
×
×
  • 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.