Jump to content

rsammy

Members
  • Posts

    212
  • Joined

  • Last visited

    Never

Everything posted by rsammy

  1. no no no. i can manage the sql part. i need to know how to? how to create a new database; where to create? stuff like that. imj working on windows xp pro sp2. thanks for your reply. and im going through the documentation on the link you pasted here. let me see if that helps me
  2. I am working on creating a new database that stores candidate information like phone number, email, status(if they are free or working elsewhere at this time), referred by, rate, etc.. i would like to know where to start. I have downloaded MySQL on my local box and need some help starting off. Any help will be great. Thanks in advance
  3. thanks much for your reply. it hides the field but, does not populate when i choose 'yes' as the option for the question: Do you own a car? Is it because PHP will only show this up when we do a POST? should i use javascript instead? if yes, can you or someone here please help me out? thanks again...
  4. i am working on a php page where i need to populate a field (<tr></tr> tags) based on the flag value of another field. i have a field: Do you own a car? The input is the result from a radio button (Yes/No). If No, do nothing. But if user chooses, Yes, then I am setting a flag ($carFlag) to true. <tr> <td width="30%" height="40" valign="top"> Do you own a car? </td> <td valign="top"> Yes <input type="radio" name="car" id="car" value="Yes" <?php echo (($car=='Yes')?"checked":""); $carflag=='True';?>> No <input type="radio" name="car" id="car" value="No" <?php echo (($car=='No')?"checked":"");?>> <a href="" onclick="javascript:return popup()"><span style="font-size:10px;">What is it?</span></a> </td><br> </tr> if car flag is true, then the another field, 'make and model' should be displayed for user to enter information.l How do I do this? Thanks
  5. hi, i am trying to upload a file (any file) to a server (in this case, my local machine). i have created two php files (named main.php and upload.php). i launch main.php and it lets me browse for a file. i select a file, say abc.txt and then click on the Upload button. at this point, what it does is, throw up a dialog box asking me if I want to open or save this file (upload.php) with Open, Save and Cancel buttons. When I click Open. it opens upload.php file in notepad/editpad. if i click Save, it lets me choose a folder to save this file for me. however, this is not what i want it to do. i would like it to save the file i chose initially (abc.txt) in a locaion i choose and i should not be worried about my upload.php script file. here is the code in my upload.php file: <?php alert "HERE"; //$web = 'c:/wamp/uploads/'; // path under webroot $web = 'c:/wamp/www/'; // path under webroot $destination =$_FILES['updfile']['name']; if ($_POST['btn'] == "Upload") { if(empty($_POST['userid'])) //Check for User ID { echo "User ID should not be Blank!!<br/>"; } else { $uploaddir = $web."".$_POST['userid']; if(!is_dir($uploaddir)) // Check for existing directory else create new dir for the user { mkdir($uploaddir); } $uploadfile = $uploaddir."/".basename($destination); if(isset($_FILES['updfile']['tmp_name'])) { if(($_FILES['updfile']['error'] == 0) && !empty($_FILES['updfile']) && !file_exists($uploadfile)) { if(move_uploaded_file($_FILES['updfile']['tmp_name'],$uploadfile)) { echo "File Uploaded Successfully!!!<br/>"; } } else echo "File Upload Failed"; } } } ?> <form> <table border ="0"> <tr> <td> List of Filenames : </td> <td> <select name="filenames" id="fields" > <?php if ($dh = opendir($uploaddir)) { while (($file = readdir($dh)) !== false) { $options = NULL; $options.= '<option value="'.$file.'">'.$file.'</option>'."\n"; echo $options; } closedir($dh); } ?> </select> </td> </tr> </form>
  6. Any help, anyone? Is it possible to call Webex API from php? Any help is greatly appreciated.
  7. Hi, I need to write a function in PHP to see if I can call a UI from another application (say, webex). Is this possible? If yes, how? I need to see if I can integrate Webex in my application.
  8. I have enabled IIS on my machine. I downloaded php-5.2.9.tar and unzipped it. Now what do I do?
  9. I have used PHP earlier - it was already installe don the computer I had worked on. I am now trying to install it on my computer - xp pro. is there a step by step instruction available on how to install the latest PHP on my computer? help regarding this is greatly appreciated
  10. thanx for your reply! im storing date as a string. i format it into yyyy-mm-dd and insert it. i really need to get the time correct here as its messing up the order of transactions(sort order, especially). this is how im inserting into the database: INSERT INTO visit_mgr(visit_phy_id, visit_pat_id, visit_pat_ssn, visit_type, visit_palm_db_id, visit_status, visit_loc, visit_room_no, visit_date, visit_time, visit_date_time, visit_timestamp, client_id, palm_tran_ID, visit_pat_first_name, visit_pat_last_name, visit_pat_dob, visit_pat_sex, visit_user_id) VALUES ('$pat_phy_id', '$PatientSSN', '$PatientSSN', 'ICN', '$dcn_db_id', 'AdmitStatus', '$AdmitVisitLocation', '$AdmitRoomNo', '$datequery', '$timequery', '$visit_date_time', '$now', '$client_id', '$dcn_db_id', '$PatientFirstName', '$PatientLastName', '$pat_dob_reformat', '$pat_sex', '$user_id') $datequery and $timequery(i know thats not how i name variables - didnt know what to name them ) are the date and time values i get by executing this query: $querytime="select Date_Format(curdate(), '%Y-%m-%d') as datequery, Time_Format(curtime(), '%H:%i:%s') as timequery"; $resulttime=mysql_db_query("$database[dbname]", $querytime); $rz=mysql_fetch_array($resulttime); $datequery=$rz["datequery"]; $timequery=$rz["timequery"]; and visit_date_time is the combination of $datequery and $timequery: $visit_date_time=$datequery. " " .$timequery; hope this makes it clear. i need to get this time to reflect the office time(which is CST and not EST where i live). any help will be great help. thanx
  11. i need to get the current time of another time zone. for instance, i am in the EST. I need to insert the current time (into a MySQL database) as PST although I am in EST. The server could be anywhere, EST, PST or even GMT. But, I need to insert the current time of a particular zone(say, PST in this case). I am working on an application for my office. My office is in CST. But I live in EST. And, the server where our files are FTPd is in PST. So, when i work from home, the records are entered in EST as against the standard office time of CST. The records should have the CST time and not EST or PST. Can someone help?
  12. thanx ben! im tryin it out, does not seem to work. i need to use this feature along with this one: <td width="456" align="left" valign="top"> <form action="addlocation.php" method="post" name="addNewLoc" id="addNewLoc" onSubmit="return validate()"> when submit button in clicked, validate() javascript function in executed(this function validates for blank field and returns an error message when field is left blank). i still need to do this along with the new feature (hitting enter should submit the form). hope im clear with my requirement. thanx once again. help here will be really really great.
  13. i am working on a php screen. there is just one field in this screen and then a 'submit' button. i enter some info on the screen and hit enter(focus is still on the text field). how do i submit the form without tabbing to the submit button? is there a way to do this? this is my field: <tr> <td width="161"> <div align="right"><font class="inputLbl">Location Name: </font></div></td> <td colspan="2"> <input name="orgname" type="text" class="txtboxLarge" id="orgname" onBlur="javascript:changeCase(document.addNewLoc.orgname);"> <font class="redTxt">*</font> </td> </tr> <tr> <td width="161"> </td> <td colspan="2"> <input class="sbttn" type="submit" name="action" value="Submit"> </td> </tr> and this is what im doing when i submit the form: <td width="456" align="left" valign="top"> <form action="addlocation.php" method="post" name="addNewLoc" id="addNewLoc" onSubmit="return validate()">
  14. thanx a millions ginger and rhodesa! you solved my problem. wonderful guyz
  15. i am not sure if this is where i need to ask this question. i am sorry, if this is not the right place. would appreicate help anyways... i am working with a php application. i need to compare two sets of names (first name, mid init and last name). if they are same, i need to pop-up a javascript alert box saying you are about to merge the info of these two patients - display their names. all works fine. only, this javascript pop-up box part does not show up when the name has an apostrophe(say somethign like Mc'Millan). could someone help me out please? its quite urgent. here is the part where it fails: echo("var answer = confirm('You are attempting to assign a Patient # that is already assigned to an existing patient in the InstiComm system. Entered Patient # already exists! The new patient you just entered is:\\n\\n Name: " .$PatientFirstName . " " .$PatientMiddleInitial . " " .$PatientLastName." \\n Patient #: " .$SavedSSN . " \\n Date of Birth: " .$PatientDOB . " \\n Enter Date: " .$PatientRegDate . "\\n\\nYou can choose to: \\n\\n a) Return to the previous screen and make a correction to the entered Patient # or, \\n b)Merge information of the two patients and losing all Patient Registration information pertaining to the patient displayed above, retaining \\n any ICN\'s/Encounters.\\n\\nThe resulting patient \'status\' will be \'Active\' if one of the merged patients is in the \'Active\' or \'Follow\' state. It will result in \'Not Active\' if both of the merged patients are \'Not Active\' or \'Do Not Follow\'. \\n\\nTHIS PATIENT WILL NO LONGER EXIST IN THE InstiComm SYSTEM.\\n\\nInformation pertaining to patient listed below will overwrite all information except the earliest Enter Date, pertaining to patient displayed at the top of this message. The patient already in the InstiComm system with entered patient # is:\\n\\n Name: " .$dbfname . " " . $dbmidinit . " " . $dblname ."\\n Patient #: " .$dbssn . "\\n Date of Birth: " .$dbdob . " \\n Enter Date: " .$dbregdate . "\\n\\n Click on OK to replace patient information(above) with new patient information(below) or, \\n CANCEL to go back and change the Patient # whose information you wish to update!\\n\\n*** CLICKING ON OK WILL DELETE ALL EXISTING PATIENT REGISTRATION INFORMATION BELONGING TO PATIENT DISPLAYED\\n AT THE TOP BUT RETAIN ALL PATIENT ICNs/ENCOUNTERS. THE RESULTING PATIENT \'STATUS\' WILL BE ACTIVE IF ONE OF\\n THE MERGED PATIENTS IS IN THE \'Active\' OR \'Follow\' STATE. IT WILL RESULT IN \'Not Active\' IF BOTH OF THE MERGED\\n PATIENTS ARE \'NOT ACTIVE\' OR \'Do Not Follow\' *** ');"); any help will be appreciated. this is really really urgent!
  16. why am i unable to change the status to "topic solved" ?
  17. why does this code not work for me? $dcn_dov = date("n/j/y",$datequery); here, $datequery is todays date - i got this by querying the database for todays date. while todays date is 2008-03-31, when i try to format it the way i want it, it gives me 12/31/69. i thot n is used to display the month without leading zeros and y is used to display year in 2 digits help pleeeease
  18. thanx northern flame! ill try that out.
  19. no no no. the wirelessaccess field is a drop down with 'Yes' or 'No' as the options. If user selects 'Yes' here, then the next field on screen, PIN is a write only field where user enters a pin ( i am doing PIN validations on this field to make sure the correct one gets thru). If the user chooses 'No' for wirelessaccess field, then the PIN field is made 'readonly' user cannot edit this field. this field may or maynot be blank onload. if wireless acess is 'Yes', the PIN field is mandatory(where user enters info) else the field is readonly(user cannot enter any info). hope im clear now...
  20. if $facility_id is NULL, it may sometimes contain a blank space. if this is the case, then if (!$facility_id) { echo "new"; } may not work as blank space is still considered a value. i may be wrong, but i've faced this before. i therefore play it safe by comparing with a blank space
  21. try this: if($facility_id == '') echo "new";
×
×
  • 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.