Jump to content

yousamook

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by yousamook

  1. Hi everyone, I need to create a php script that would work with Windows Fax Console to send a fax. I know that there are websites that offer api's that do this but I am not interested in purchasing any service. Can anyone send me in the right direction on how I can create a script that will help me send a fax with my web server using the Windows Fax Console. Thanks, Larry
  2. hi everyone! So i need to get a users input from my form so i created a table with PHP that basically throws out the information and creates multiple positions in that table. the code i used was this: <?php $exit = "<table border=0 ><tr><td align=left colspan=600>"; $exit .= "<tr> <td ><span class=underline>Description</span></td> <td ><span class=underline>Date Received</span></td> <td ><span class=underline>Date Issued</span></td> <td ><span class=underline>Date Expired</span></td> <td ><span class=underline>Certificate or License Number</span></td> </tr>"; $db = new dbConnection(); $db->dbConnect(); $db->dbSelect(); $query_doc = " select dt.uniqueid, dt.description , formatDate(pd.date_received) as date_received, formatDate(date_inservice) as date_inservice, formatDate(date_expired) as date_expired, license from document_types dt left join personnel_document pd on (pd.doc_type = dt.uniqueid and pd.empnum = $EmpNum) order by 2"; $ds = mssql_query($query_doc); $exit .= "<input type=hidden value='" . mssql_query($ds). "' id=ciclos name=ciclos>"; $position = 1; while ($row = mssql_fetch_array($ds)) { extract($row); $exit .= "<tr> <td><span class=doc_style><label for = description$position> $description</label></span></td> <td><input type=text name= date_received$position id= date_received$position size=15 value= '$date_received' ></td> <td><input type=text name = date_inservice$position id= date_inservice$position value= ' $date_inservice' size=15></td> <td><input type=text name= date_expired$position id= date_expired$position value= ' $date_expired' size=15></td> <td><input type=text name = license id= license value= ' $license' size=30></td> </tr>"; $position++; } $exit .= "</td></tr></table>"; echo $exit; ?> now what that does if you do a : $keys = array_keys($_POST); $values = array_values($_POST); for ($i = 0; $i <= count($keys); $i++) echo "{$keys[$i]} = {$values[$i]} <br>"; is take out the information from the post and number it from 1 to 15 as show here : date_received1 = date_inservice1 = date_expired1 = license1 = date_received2 = date_inservice2 = date_expired2 = license2 = date_received3 = date_inservice3 = date_expired3 = license3 = date_received4 = date_inservice4 = date_expired4 = license4 = date_received5 = date_inservice5 = date_expired5 = license5 = date_received6 = date_inservice6 = date_expired6 = license6 = date_received7 = date_inservice7 = date_expired7 = license7 = etc..... I need to make an update statement to update my MS SQL with the user input but not sure how to do it... I dont want to do 15 different updates.... does anyone know a better way to get ths information into an update statement? Someone please help me with this issue! :confused:
  3. Hey guys and gals! This is my first post here and needing a bit of help with my php code! So here is the deal, i have 3 tables in ms sql 2000 which i will be using on this project. i have an employee table that has the regular information such as: TABLE employee( uniqueid, employee_number, lastname, firstname, dob, address, city, state, zip ) TABLE employee_docs( uniqueid, employee_number, doc_type int, date_received, date_issued, date_expired ) TABLE doc_type(uniqueid, description, valid_month) so basically from the employee_doc table, the doc_type column is an int and will have the description of the document as well as valid month column which will tell you how long the document type is valid until. the Description gives a brief description of what the product is. The uniqueid is used as what ever number is chose from the employee_docs table will represent the document type from table doc_type. ok so now that i gave a brief explanation of the tables i am working with, I can tell you what i need. i need a php page that will display: employee number, lastname, firstname, doc_type, date_received, date_issued, date_expired. select pn.empnum as employeeid, (pn.lastname + ', ' + pn.firstname)as [Full Name], dt.description as doc_type, formatDate(pd.received) as [Date Received], formatDate(pd.expired)as [Date Expired], formatDate(pd.issued) as [Date In Service] from personnel_document pd left join document_types dt on (dt.uniqueid = pd.doc_type) left join personnel pn on (pd.empnum = pn.empnum) where pd.empnum = '$EmpNum' now, I went ahead and did this for the html part: <table border=0> <tr> <td height=20px weight=1px valign=bottom><span class=underline>DESCRIPTION</span></td> <td height=20px weight=1px valign=bottom><span class=underline>DATE RECEIVED</span></td> <td height=20px weight=1px valign=bottom><span class=underline>LICENSE NUMBER</span></td> <td height=20px weight=1px valign=bottom><span class=underline>DATE IN SERVICE</span></td> <td height=20px weight=1px valign=bottom><span class=underline>DATE EXPIRED</span></td> </tr> <tr> </tr> <tr> <td height=20px valign=bottom><span class=label_text>PHYSICAL EXAM</span></td> <td valign=top><input class=demog_box type=text size=10 name= phexam_dr id=phexam_dr onBlur= 'formatDate(this)' value='<?php echo $phexam_dr; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= phexam_ln id=phexam_ln onBlur='formatDate(this)' value='<?php echo $phexam_ln; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= phexam_is id=phexam_is onBlur= 'formatDate(this)' value='<?php echo $phexam_is; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= phexam_ex id=phexam_ex onBlur='formatDate(this)' value='<?php echo $phexam_ex; ?>'> </td> </tr> <tr> </tr> <tr> <td height=20px valign=bottom><span class=label_text>PROFESSIONAL LICENSE</span></td> <td valign=top><input class=demog_box type=text size=10 name= prolic_dr id=prolic_dr onBlur='formatDate(this)' value='<?php echo $prolic_dr; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= prolic_ln id=prolic_ln onBlur='formatDate(this)' value='<?php echo $prolic_ln; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= prolic_is id=prolic_is onBlur='formatDate(this)' value='<?php echo $prolic_is; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= prolic_ex id=prolic_ex onBlur='formatDate(this)' value='<?php echo $prolic_ex; ?>'> </td> </tr> <tr> </tr> <tr> <td height=20px valign=bottom><span class=label_text>PROFESSIONAL INSURANCE</span></td> <td valign=top><input class=demog_box type=text size=10 name= proins_dr id=proins_dr onBlur='formatDate(this)' value='<?php echo $proins_dr; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= proins_ln id=proins_ln onBlur='formatDate(this)' value='<?php echo $proins_ln; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= proins_is id=proins_is onBlur='formatDate(this)' value='<?php echo $proins_is; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name= proins_ex id=proins_ex onBlur='formatDate(this)' value='<?php echo $proins_ex; ?>'> </td> </tr> <tr> </tr> <tr> <td height=20px valign=bottom><span class=label_text>DRIVER'S LICENSE</span></td> <td valign=top><input class=demog_box type=text size=10 name=dl_dr id=dl_dr onBlur='formatDate(this)' value='<?php echo $dl_dr; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name=dl_ln id=dl_ln onBlur='formatDate(this)' value='<?php echo $dl_ln; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name=dl_is id=dl_is onBlur='formatDate(this)' value='<?php echo $dl_is; ?>'> </td> <td valign=top><input class=demog_box type=text size=10 name=dl_ex id=dl_ex onBlur='formatDate(this)' value='<?php echo $dl_ex; ?>'> </td> </tr> <tr> </tr> <tr> </table> I am now doing the the sql statement to insert into my db but i am stuck. i basically want to get the information that the user enters for each field and save it on the employees profile. $querydoc = "update personnel_document set empnum = '$EmpNum' , doc_type = ???, date_received = ????, date_expired = ????, date issued = ??? where empnum = '$EmpNum' "; The problem is that since each description has a different variable im not sure how to update it.... would I have to create a new update for each description? also I hard coded the name of each description but i believe it is better if i echo the description name from the db as i cant use taht as the doc_type... i am pretty confused, if anyone has a better way of doing this i would really appreciate it! eventually i also want to make sure that the description is expired to to with the fields I have there and promp the user of something that is expired. Once again, any help given is much appreciated!!!
×
×
  • 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.