Jump to content

rsammy

Members
  • Posts

    212
  • Joined

  • Last visited

    Never

Everything posted by rsammy

  1. thanx for ur replies guys! really appreciate ur help. little guy and nicklas - both ideas work! thanx!!!!!!!!!
  2. thanx for ur replies guys. but ill need some spoon feeding here. i wud like to show the first and last name initials for phy_fname and phy_lname in the code above! how do i do that. im not too comfortable with php yet!
  3. i need to just display the initials of a doctors name - say if the doctor is John Smith, JS shud be displayed. this is my code: ************** $query2="SELECT visit_mgr.visit_id, visit_mgr.visit_status, visit_mgr.visit_loc, visit_mgr.visit_pat_id, visit_mgr.visit_phy_id, Date_Format(visit_mgr.visit_date, '%m/%d/%Y') as date,  phy_det.phy_fname, phy_det.phy_lname, pat_dgraphics.pat_first_name, pat_dgraphics.pat_last_name, Date_Format(pat_dgraphics.pat_dob, '%m/%d/%Y') as pat_birthday, pat_dgraphics.pat_sex, pat_dgraphics.pat_ssn, pat_dgraphics.pat_ID, diag.diag_diag, visit_mgr.client_id FROM visit_mgr, phy_det, pat_dgraphics, diag WHERE visit_mgr.visit_type like '%$select1%' AND phy_det.phy_id=visit_mgr.visit_phy_id AND visit_mgr.visit_pat_id=pat_dgraphics.pat_ssn AND phy_det.phy_fname like '%$search3%' AND phy_det.phy_lname like '%$search4%' AND pat_dgraphics.pat_first_name like '%$search1%' AND pat_dgraphics.pat_last_name like '%$search2%' AND pat_dgraphics.pat_ssn like '%$search5%' AND diag.diag_visit_id=visit_mgr.visit_id AND diag.diag_patid=pat_dgraphics.pat_ID AND visit_mgr.client_id $clientid AND visit_date <= '$dates' AND visit_date >= '$datez' ORDER BY $select2  $select"; $result=mysql_db_query("$database[dbname]", $query2); $num_rows=mysql_num_rows($result); $num_results=mysql_num_rows($result); $i=1; if(!isset($rowNum)) { $rowNum = 0; } $rowNumHold = $rowNum; $count = 1; $limit_results = 25; if ($num_rows > 0) { for($q=0;$q<$limit_results && $rowNum < $num_rows;$q++) { if(mysql_data_seek($result, $rowNum++)) { if ($i++%2) { print ("<tr  bgcolor=\"#cccccc\">"); } else { print ("<tr>"); } $row = mysql_fetch_object($result); print("<td height=\"14\"> <div align=\"left\">"); print($row->pat_last_name); print(", "); print($row->pat_first_name); print("</div></td>"); print("<td height=\"14\"> <div align=\"center\">"); print($row->pat_birthday); print("</div></td>"); print("<td height=\"14\"> <div align=\"center\">"); print($row->pat_ssn); print("</div></td>"); print("<td height=\"14\"> <div align=\"center\">"); print($row->phy_fname); print(" "); print($row->phy_lname); print("</div></td>"); $client_id=($row->client_id); print("<td height=\"14\"> <div align=\"center\">"); print($row->date); print("</div></td>"); print("<td height=\"14\"> <div align=\"center\">"); print ("<a href=\"Recorddetails.php?visit_id=$row->visit_id&visit_type=ICN&client_id=$row->client_id&visit_status=$row->visit_status&visit_loc=$row->visit_loc&pat_first_name=$row->pat_first_name&pat_last_name=$row->pat_last_name&phy_fname=$row->phy_fname&phy_lname=$row->phy_lname&pat_dob=$row->pat_birthday&pat_ssn=$row->pat_ssn&pat_sex=$row->pat_sex\">Details</a>"); print("</div></td>"); print("</tr>"); } } **************** how can i accomplish that in this code? thanks in advance
  4. never mind, i figured it out. uve been a great help. thanx
  5. i am confused at the point where u r comparing the phy_id to pat_phy_id. i dont have an id to compare withhere. i just need to display all results with a blank included. please help
  6. i really appreciate ur help haaglin! i need somemore help tho... now I am stuck with this one! this seems to be a pretty straight forward one, but I am not able to go ahead with this one either. I need to do the same here too... insert a blank in the drop down and default it to the blank on pageload. <tr>   <td width="196"> <div align="right"><font class="inputLbl">Location:&nbsp;&nbsp;</font></div></td>   <td colspan="2">     <?PHP $querys="SELECT org_ID, org_name FROM orgs where org_type !='Office' order by org_name ASC"; $results= mysql_query ($querys); if ($results) { print ("<select name='location'>"); if ($row= mysql_fetch_array($results)) { do {   print ("<option value=\"");   print $row["org_ID"];   print ("\">");   print $row["org_name"];   print ("</option>"); } while ($row = mysql_fetch_array($results)); } } print ("</select>");     ?>   </td> </tr> help please?
  7. I have some fields on my screen which are drop-down boxes. right now, i either have them default to the very first on the list or a selected value. i need to do it slightly different. i need to insert a blank value in the drop down and make it the default and then display the list from the database. heres my code ... <tr>   <td width="275"> <div align="right"><font class="inputLbl">Preferred Provider:&nbsp;&nbsp;</font></div></td>   <td colspan="2"> <?PHP         $query="select phy_id, phy_fname, phy_lname from phy_det where phy_disabled = 'Enable' order by phy_lname, phy_fname";                 $result= mysql_query ($query);         if ($result)         {         print ("<select name='physician'>");             if ($row = mysql_fetch_array($result)) {     do     {             print("<option value=\""); print $row["phy_id"]; if($pat_phy_id == $row["phy_id"]) {     print("\" selected>"); } else {     print("\">"); }   print $row["phy_lname"]; print (", "); print $row["phy_fname"];   print("</option>");   }   while($row = mysql_fetch_array($result));   } } print ("</select>");         ?>   </td> </tr> now, how do i insert a blank in the drop down before filling it with values obtained from the query? help please... thanx in advance!
  8. i am trying this query in my php file. but,it still displays only one of 7 values in the table... HELP PLEASE $querylistdt="SELECT * from oncall order by oncall_id desc limit '5'"; $resultlistdt=mysql_query($querylistdt); $rowlistdt=mysql_fetch_array($resultlistdt); $list_date=$rowlistdt["oncall_date"]; $list_time=$rowlistdt["oncall_time"]; $list_oncallid=$rowlistdt["oncall_id"]; $list_oncallorgid=$rowlistdt["oncall_org_id"]; $list_oncallphyid=$rowlistdt["oncall_phy_id"];
  9. that was a great help! thanx, bqallover! ;D
  10. Can someone help me please??????? i am trying to hide a field on screen. But, I need to default it to a value that I will be using to populate the database. I tried some ways but am not successful here. This is the original code: <tr> <td width="275"><div align="right"><font class="inputLbl">Registered Client: &nbsp;</font> </div></td> <td colspan="2"><? $queryclient="SELECT client_name, client_id FROM clients"; $resultclient= mysql_query($queryclient); if ($resultclient) //if (mysql_num_rows($resultclient) != 0) {     //print ("<select name='client_id'>");     print ("<select name='ClientName'>");     if ($row = mysql_fetch_array($resultclient))     { do {     print("<option value=\"");     echo $row["client_name"];     if ($row["client_name"]== $client_name)     { print("\" selected>");     }     else     {           print("\">");     }     print $row["client_name"];     print("</option>"); //} } while($row = mysql_fetch_array($resultclient));         }   }   print ("</select>"); ?></td> </tr> This code displays the value as a drop down box. it has 3 values in the database table and it displays them.  I dont want this now. What I now need is to default this field to one particular value from the drop down. i will need to pass this value to a variable or something so I can save it in the db table. I am trying to do somethign like this ... <tr>   <td width="283"> <div align="right"><font class="inputLbl">   <input type="hidden" name="Client_Name" value="<?                                 print ("$xxxxxxxx"); ?>">                        </font></div></td>   <td colspan="2">&nbsp;</td> </tr> $xxxxxxxx could be the default value, say 'Group'. I need it to point to Group to be able to insert it into the db table. Please help me guys...
  11. OK here it is: I am running this query to get the numbre of rows into $num_rowz $queryz = "SELECT message, user_id, status, from_p, subject, DATE_FORMAT(received, '%m/%d/%Y') as date, ID, to_email, time_sent, grp_id FROM messages WHERE request !='settodelete' AND user_id='$userid'  and received >='$dbdates' and received <='$dbdate' order by ID DESC "; $resultz = mysql_query($queryz); $num_rowz = mysql_num_rows($resultz); $sendcounter = $num_rowz; I am then passing this variable $sendcounter to the next page via the link to that page. this is how i am doing it... <td><a href="view.php?sendcounter=$sendcounter"<?PHP       print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ); ?>" >       <?PHP             $queryfrom = "SELECT user_fname, user_lname, user_email FROM user_mgr WHERE  user_email='$from_p' "; $resultfrom = mysql_query($queryfrom); $rowfrom = mysql_fetch_array($resultfrom); $fname= $rowfrom["user_fname"];             $lname=$rowfrom["user_lname"]; $uname = $user_fname ." ". $user_lname; print ($uname);       ?></a></td>       <td><a href="view.php?sendcounter=$sendcounter"<?PHP print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ); ?>"><?PHP print($rowz["subject"]); ?></a></td> <td><a href="view.php?sendcounter=$sendcounter"<?PHP print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ); ?>"><?PHP print($rowz["date"]."&nbsp;&nbsp;".$row["time_sent"]); ?></a></td>                                         <td colspan="8">&nbsp;</td>                 </tr> on the next page, view.php, I am doing this... $sendcounter=$_GET["sendcounter"]; i then try to display it on this page and it only displays a blank as the variable carries the value '$sendcounter' and not the number of rows that it is supposed to carry!!! this is how i am trying ot display it on the next page(view.php) ---       <tr>       <td> <div align="center"><img src="images/selectedfolder-icon.gif" width="16" height="13">                           <a href="main.php">Inbox                           ( <?PHP if ($num_rowz > 0){ print($num_rowz); } else { print("111");} ?> )       </a></div></td>       </tr> ********** am i doing the right thing? is there something that i am missing. i really need some HELP here pleaaaaaaaaaaaase!
  12. rsammy

    initials

    thanx for replying obsidian! i still amconfused my original code is like this: $query2="SELECT **********from ***** where ********** $result=mysql_db_query("$database[dbname]", $query2); $num_rows=mysql_num_rows($result); $num_results=mysql_num_rows($result); $i=1; if(!isset($rowNum)) {     $rowNum = 0; } $rowNumHold = $rowNum; $count = 1; $limit_results = 25; if ($num_rows > 0) {     for($q=0;$q<$limit_results && $rowNum < $num_rows;$q++)     { if(mysql_data_seek($result, $rowNum++)) {       if ($i++%2)       { print ("<tr  bgcolor=\"#cccccc\">");       }     else {       print ("<tr>"); } $row = mysql_fetch_object($result); print("<td height=\"14\"> <div align=\"left\">");             print($row->pat_last_name); print(", "); print($row->pat_first_name); print("</div></td>"); print("<td height=\"14\"> <div align=\"center\">"); print($row->pat_birthday); print("</div></td>"); print("<td height=\"14\"> <div align=\"center\">"); print($row->pat_ssn); print("</div></td>"); print("<td height=\"14\"> <div align=\"left\">"); print($row->phy_fname); print(" "); print($row->phy_lname); print("</div></td>"); $client_id=($row->client_id); print("<td height=\"14\"> <div align=\"center\">"); print($row->date); print("</div></td>"); print("<td height=\"14\"> <div align=\"center\">"); print ("<a href=\"Recorddetails.php?visit_id=$row->visit_id&visit_type=ICN&client_id=$row-                       >client_id&visit_status=$row->visit_status&visit_loc=$row-                       >visit_loc&pat_first_name=$row->pat_first_name&pat_last_name=$row-                       >pat_last_name&phy_fname=$row->phy_fname&phy_lname=$row-                       >phy_lname&pat_dob=$row->pat_birthday&pat_ssn=$row-                       >pat_ssn&pat_sex=$row->pat_sex\">Details</a>"); print("</div></td>"); print("</tr>");       } } ********* now if you look at phy_lname and phy_fname - thats where i need to use initials in place of full phycians full name. also i need to pass the same stuff to the next page - recorddetails.php how would i be able to do that? help will be greatly appreciated thanx
  13. hi how do i display just the initials on the form ... not the full name. if thename is John Smith, I need to just dsplay JS on the screen Thanks
  14. thorpe, i am kinda new to php. thats the reason i posted all the code there, so someone can correct me if am wrong somewhere. my problem is that i shud display the number of items(mails/messages) in the brackets next to Inbox and Sent Items folder names in view.php I am trying to pass the variable that contains the number of messages - $sendcounter - to view.php from main.php via the url. it does not get through.  how do i retrieve(and display) the value from this variable in view.php? thanx
  15. thanx for ur reply, skatecrazy. yes, i am aware that my end php tag shud be ?> i had to clip off some code here as it wud not let me post the whole code - may be there is a limit on the number of characters or lines?! also, i didnt get ur comment on the third line... wat did u mean? can u clarify pelase?
  16. $sendcounter=$_GET["sendcounter"];           .           .           . if ($user_auth == "2") { $querydisplay = "SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject,   DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent, messages.grp_id,   user_mgr.user_fname, user_mgr.user_lname, user_mgr.user_id, user_mgr.user_email   FROM messages, user_mgr   WHERE messages.ID='$mess_id'   AND user_mgr.user_id = messages.user_id"; } else { $querydisplay = "SELECT message, user_id, status, from_p, subject, DATE_FORMAT(received, '%m/%d/%Y') as date, ID, to_email, time_sent, grp_id FROM messages WHERE user_id='$userid' AND ID='$mess_id' AND request !='settodelete'"; }         <tr>           <td width="10">&nbsp;</td>           <td width="235" bgcolor="#006699"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#FFFFFF"><b>FOLDERS</b></font></div></td>           <td width="1">&nbsp;</td>           <td width="25">&nbsp;</td>         </tr>         <tr>           <td width="10">&nbsp;</td>           <td width="235" align="left" valign="top"> <table width="253" border="1" cellspacing="0" cellpadding="0" bordercolor="#006699">               <tr>                 <td width="249" align="left" valign="top"> <table width="224" border="0" cellspacing="0" cellpadding="0">                     <tr>                       <td width="224">&nbsp;</td>                     </tr> [color=red][font=Verdana]***************[color=red][font=Verdana]NOW THIS IS WHERE I AM TRYING TO PRINT IT ON THE SCREEN[/font][/color]*********************[/font][/color]                                      <tr>                       <td> <div align="center"><img src="images/selectedfolder-icon.gif" width="16" height="13">                           <a href="main.php">Inbox                                   ( <?PHP if ($sendcounter > 0){ print($sendcounter); } else { print("111");} ?> )                           </a></div></td>                     </tr>                     <tr>                           <td> <div align="center"><img src="images/selectedfolder-icon.gif" width="16" height="13">     <a href="sent.php">Sent Items ( <?PHP if ($num_rowz > 0){ print($num_rowsent); } else { print                                                                                                                                                  ("111");} ? )                                                      </a></div></td>       </tr>                     <tr>                       <td> <div align="center"><img src="images/compose-button.gif" width="21" height="15">                           <a href="compose.php">Compose</a></div></td>                     </tr>                     <tr>                       <td>                         <?PHP please help me guys as i am stuck badly here. thanx is advance!
  17. Need help please... i am trying to work on an application that involves sending and receiving internal emails. that system works fine. what i need to do though is to display the number of emails in the Inbox and Sent Items folders  on each page of the email part. for instance - first is the main.php page. here the list of emails is displayed by default based on dates selected. On the left hand corner of the screen I have Inbox(xx) and Sent Items(xx) displayed where xx is the number of messages. I am able to display thsi number on main.php. However, when the user clicks on one of the emails to get to the email boy on view.php, i am not able to display the numbers correctly. I need to do the same when user clicks on Reply button on this page to go the next page(compose.php). This is how my code is on main.php where it works fine : if ($user_auth == "2") {     $queryz="SELECT message, user_id, status, from_p, subject, DATE_FORMAT(received, '%m/%d/%Y') as date,                   ID, to_email, time_sent, grp_id                   FROM messages                   WHERE received >='$dbdates'                   and received <='$dbdate' order by ID DESC ";     $querysent="SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject,                       DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent,                            messages.grp_id                       FROM messages, sent_messages                       WHERE messages.received >='$dbdates'                       and messages.received <='$dbdate'                       and messages.id = sent_messages.message_id                       and sent_messages.user_id='$userid'                       order by messages.ID DESC"; } else {     $queryz = "SELECT message, user_id, status, from_p, subject, DATE_FORMAT(received, '%m/%d/%Y') as date, ID, to_email,                     time_sent, grp_id                     FROM messages                     WHERE request !='settodelete'                     AND user_id='$userid'                      and received >='$dbdates'                     and received <='$dbdate'                     order by ID DESC ";     $querysent="SELECT messages.message, messages.user_id, messages.status, messages.from_p, messages.subject,                       DATE_FORMAT(messages.received, '%m/%d/%Y') as date, messages.ID, messages.to_email, messages.time_sent,                       messages.grp_id                       FROM messages, sent_messages                       WHERE messages.request !='settodelete'                       AND messages.user_id='$userid'                       and messages.received >='$dbdates'                       and messages.received <='$dbdate'                       and messages.id = sent_messages.message_id                       and sent_messages.user_id='$userid'                       order by messages.ID DESC"; } $resultz = mysql_query($queryz); $num_rowz = mysql_num_rows($resultz); $sendcounter = $num_rowz; $from_p = $num_rowz["from_p"]; $resultsent = mysql_query($querysent); $num_rowsent = mysql_num_rows($resultsent); <tr>           <td width="10">&nbsp;</td>           <td width="213" align="left" valign="top"> <table width="240" border="1" cellspacing="0" cellpadding="0" bordercolor="#006699">               <tr>                 <td width="236" align="left" valign="top"> <table width="222" border="0" cellspacing="0" cellpadding="0">                     <tr>                       <td width="222">&nbsp;</td>                     </tr>                     <tr>                       <td> <div align="center"><img src="images/selectedfolder-icon.gif" width="16" height="13">                           <a href="main.php">Inbox                           ( <?PHP print($num_rowz); ?> )</a></div></td>                     </tr>                     <tr> <td> <div align="center"><img src="images/selectedfolder-icon.gif" width="16" height="13">   <a href="sent.php">Sent Items  ( <?PHP print($num_rowsent); ?> )</a></div></td>       </tr>                     <tr>                       <td> <div align="center"><img src="images/compose-button.gif" width="21" height="15">                           <a href="compose.php">Compose</a></div></td>                     </tr>         .         .         .       if ($num_rowz > 0)       {         .         .         .         <td><a href='view.php?$sendcounter=10'<?PHP                   print("?mess_id=".$rowz"ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 );?>" >                   <?PHP $queryfrom = "SELECT user_fname, user_lname, user_email FROM user_mgr WHERE user_email='$from_p' "; $resultfrom = mysql_query($queryfrom); $rowfrom = mysql_fetch_array($resultfrom);             $fname= $rowfrom["user_fname"]; $lname=$rowfrom["user_lname"]; $uname = $user_fname ." ". $user_lname; print ($uname); ?></a></td>                   <td><a href="view.php?sendcounter='$sendcounter'"<?PHP                       print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ); ?>"><?PHP print($rowz["subject"]);                       ?></a></td>                   <td><a href="view.php?sendcounter='$sendcounter'"<?PHP print("?mess_id=".$rowz["ID"]. "&m1=".$m1. "&d1=".$d1 . "&y1=".$y1. "&m2=".$m2 . "&d2=".$d2 . "&y2=".$y2 ); ?>"><?PHP print($rowz["date"]."&nbsp;&nbsp;".$row["time_sent"]); ?></a></td>                   <td colspan="8">&nbsp;</td>                 </tr> .......... when i click on one of the links above, it takes me to view.php and there the code is shown in my reply to this post
  18. why am in not able to post a new thread? i have a query and need help badly!!!!
  19. i am working on a php app. i need to populate a list box(drop down) with three values(not from db) like 'ALL', 'ACTIVE' and "INACTIVE'. when 'ACTIVE' is chosen from the list box, i need to check one table in the db and get all the info from the table based on a certain criteria. if INACTIVE is chosen, then another table is searched and infor from that table needs to be displayed. ALL displays values from both tables. Lemme make it clearer: I have two tables: admission and admit_status. the admission table has a field called discharge_date. as long as the patient is admitted, this field shows '00-00'0000' as the date. it is updated with the date when the patient is discharged. while this date is being updated, the patients info(such as, location, reason, room_no, admit date, etc.) is deleted from theadmit_status table. I am checking on a patient activity summary report. in this report, i need to see all those patients who are either "ACTIVE' or "INACTIVE'. ACTIVE means the patient is still active in the hospital(admitted state and his discharge_date in the admission table is still '0000-00-00'. If the I choose INACTIVE from the drop down, the those patients who have been discharged and not active (or admitted in the hospital) - whose info has been deleted from the admit_status table - need to be displayed. ALL -should display all patients irrespective of their status. hope i am clear here. any help will be appreciated. THANKS
  20. thanks, for ur replies. it helped me quite a bit. when i check for ssn and thenfind a match, i need to show a new screen with details of the existing ssn(name, address, date of admission, etc.) and ask user if he/she wishes to overwrite existing data with new data or retian old data! how can i do that? my exisitign code is shown in the [b]attached file[/b]. i am not updating the database table in this php file. the actual updates/inserts are done in anothoer page with confirmation message! I need to add another screen between these two php pages. thats where i present users with the option to either over write or retain existing data for a duplicate ssn entered. i hope my issue is clear to u guys
  21. [quote author=appeland link=topic=104680.msg417679#msg417679 date=1155850233] Well, you are going to write it to some database somewhere, I guess. Just do a select on the column, checking if the same one is already in there. For me personally that's just a number and I guess you have to be resident of the US to understand why there is a paranoia about a little number :) [/quote] i am in the US myself and do have an SSN! i need to validate this field. Not sure how to do it.
  22. [quote author=AndyB link=topic=104680.msg417677#msg417677 date=1155849698] Before you go too far, you might want to be sure that privacy policies/legislation actually allow you to ask for an SSN.  Although people might ask for mine, my answer is always "that's between me and the government, and it's private". [/quote] i am working on a medical application for a group of doctors. ssn needs to be collected and entered into the system for the patient!
  23. hi, how do i validate SSN using PHP? i mean, i have a SSN field in my MySQL database. I am validating it for lenght(9 digits) and numerics! but, i need to validate it for duplicates too. how do i prevent duplicates? the application i am working on is: i can enter a patient into the system with a temp id(SSN like PXXXXXXXXXXX). The doctors keep checking on the patient. But the Data Entry associate at the front office(or whoever that is) will need to update the table with the patients proper SSN. the associate enters a SSN and the system validates it for duplicates. If no match is found, the new SSN is updated for the record. If SSN exists, a new screen is thrown up asking if new patient info needs to overwrite existing info or ignore. If associate says YES to overwrite, then database shud be updated with new SSN and other info for existing rec! hope i didnt confuse u guys ???
  24. [quote author=Barand link=topic=104273.msg416376#msg416376 date=1155670763] A simple form with a name input field and a submit button. The default form method is GET and the default action it to call the sames page [code] <FORM> <input type="text" name="name" size="30"> <input type="submit" name="submit" value="Submit"> </FORM> [/code] Processing [code]<?php // //  check if data has been sent to the page // if (isset($_GET['submit'])) { // //   make first letter of each word upper case (http://www.php.net/ucwords) // $name = ucwords($_GET['name']); // // echo the name eg John Smith // echo "Name : $name"; // // update the database inserting a new record with eg  name = John Smith // mysql_query("INSERT INTO patients (name) VALUES ('$name')") or die(mysql_error()); } ?> [/code] [/quote] great! got it. thanx for ur help!
×
×
  • 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.