Jump to content

dennishall

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dennishall's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I resolved this myself by modifying my AJAX script in the head and then inserting a sleep() command after my db close in my php processor file.
  2. Hi All: I've been working on a POC ROI form that works well until I attempt to process the form data. To be more clear, the form animation works fine when not processing the php file related (see lines 66, and 157 in index.php to disable php processing) Also see comment on line 142. When I enable the php processing by commenting line 66 and and inserting go.php in the action="" of the FORM tag, the php processes correctly and writes to MySQL. When I disable this function th eforms JQuery works fine, but (of course) the input is not submitted to MySQL via my go.php process. My issue is that I'm trying to have the best of both worlds where my form animation is perfect AND I write to MySQL so this means I cannot be redirected to go.php and I also need the user input to remain in the form. I know AJAX should be the solution, and I have tried many things (for my last attempt, see commented lines 139 to 148). Can anyone assist me in where and what specific AJAX code I would need to insert to get my JQuery to remain fully functional AND make use of my go.php? I have attached my roi.zip containing the the index.php and go.php files - my DB table is straight forward, table name roi with the 4 fields named software(VARCHAR30), patients(INT11), reimbursement(INT11), and rejection(INT11)) Thanks in advance and Happy Holidays. Best Regards, dennishall [attachment deleted by admin]
  3. Hi Litebearer and jcbones: jcbones: I had tried that post you refer to before and got zero results downloading (not different than my own results). Litebearer: My db field is Type:mediumblob Attribs:binary I am able to echo the binary output of the file if I modify test.php to echo $content, but you will have to scroll about 20 screens to get to the download button if I do. Based on those results, I would have expected to at least get garbage out due to in correct mime type. If I can provide you further info, I'll be happy to. Best Regards, dennishall
  4. Hi all: I have been going nuts trying to get this to work. I have gone through many attempts based on internet searches and examples that simply do not work. I have files stored in my MySQL db. The files cna be of any type and are being displayed in a listed report. The files are hyperlinked and clickable, but here is the issue: When I click on a file in: http://development.products-and-services.ca/cms/test.php I get: http://development.products-and-services.ca/cms/test2.php?content=DHall_CV_webdev_eng.pdf as a blank page result. The objective is to get a file download alert or to see the file in the browser. Any ideas?
  5. "/current_dir_of_requesting_page/filename.filetype" is the result I see in teh 404 page. The informations stored in the name field in my db is only the filename.filetype. What am trying to return when the href is clicked is the MySQL path and filename.filetype. Example: I upload file.pdf to my db The user sees file.pdf in the name field of teh result page The user clicks the file.pdf link in teh name field and gets the following: ERROR 404 page: /cms/file.pdf not found. btw: /cms/ is teh dir that I'm running the result page in. My question is: How do I define teh path to the file in the MySQL db? Best Regards
  6. Thanks for the info Miss_Reelx: The $row['name'] is storing the filename of teh file stored in the MySQL database. My objective is to have the user click on the href and the file will open using their appropriate viewer.
  7. Hi: I'm a newby regarding uploading files to MySQL, turning report output into an HREF, and getting MySQL data via a hyperlink. I have successfully uploaded, files to MySQL, I have also been able to display filename information as a hyperlink in report output, but when I click on the hyperlink, I get the following message format on a 404 page: The requested URL /current_dir_of_requesting_page/filename.filetype was not found on this server. My reporting page has teh following line of code in a report table to create the hyperlink: <td style="width:225px"><? echo "<a href=".$row['name'].">".$row['name']."</a>";?></td> Can anyone assist me with this?
  8. !!!! objNoob !!!! You ARE the man!!! I works GREAT. SOLVED Now I gotta analyze the new upload file to get a deeper undertanding. Sincerely... If there is anything I can do to help you anytime, please email me directly or message me here. All the best, dennishall
  9. Thanks for this help objNoob: I remmed out: if (!isset($_GET['usr']) && !isset($_GET['code']) ) { $msg = "ERROR: The code does not match.."; exit(); } and replaced it with the code you provided, no change. When you activated your user and then went to upload your resume in activate.php, you received a blank white screen. This screen is supposed to display the display upload.php html code (at the bottom of upload.php). You also saw that the file to upload was not present in the database. Although I know this is not the issue, an image of the subscribers db table is attached for your reference. If you wish to help me more, I can provide you (via your email) with my online meeting room access and chat. you can then see things more first hand. Let me know... Thanks so much for this. dennishall [attachment deleted by admin]
  10. Hi objNoob: I used to have sessions enabled, however, when I migrated to a new host, I had soo many session errors displaying (that I disabled sessions until I could catch up with my backlog. Only lately, i have started going back and enabling sessions. The files you have should have teh start_session(); remmed out? I am not getting ckey errors, it is all working fine. You can check this out at http://mbtech.products-and-services.ca/careers.php and you can see the successful registration in the db at http://mbtech.products-and-services.ca/cms/index.php, click on Subscribers in the menu (I have temproarily disabled security just for you). I really appreciate this assistance. dennishall
  11. Hi objNoob: I followed your instructions as best as I could, but no difference. My knowledge and skills are definately lacking on global variables, could this be the issue? I have added the application form into the zip file and resubmitted it with you suggestions in the files. I do suspect my email variable is the issue as well, but am lost on how to fix it. Been working at it too long. Can you please advise further? Best Regards, dennishall [attachment deleted by admin]
  12. Thanks objNoob: I have uploaded contact.zip. I have made other changes to the files since positng the original code, as I think this may be related to globals not being declared, but I just do not know enough about globals yet. [attachment deleted by admin]
  13. Thanks objNoob: I have done this and see no difference. Any other suggestions?
  14. The 2 form tags are because one is an email and the other is a file upload. How can I do this differently?
  15. Hi: I'm going crazy trying to do the following: I'm making a job registration process where the user registers on one php page to the website, must acknowlege and email receipt using an activate php page, then is directed to upload their C.V. (resume) based on the email address they enter in the active page output. I then run an upload page to store the resume in teh MySQL db based on the users email address in the same record. If I isolate the process of the user registering to the db, it works perfectly. If I isolate the file upload process into the db, it works perfect. I simply cannot upload teh file to the existing record based on teh email form field matching the user_email field in the db. With the processes together, teh user is activated, but teh file is not uploaded. Maybe I've simply been at this too long today, but am compeled to get through it by end day. If anyone can help sugest a better way or help me fix this, I will soo greatly appreciate it. My code is as follows for the 2 pages. ---------activate.php------- <?php session_start(); include ('reg_dbc.php'); if (!isset($_GET['usr']) && !isset($_GET['code']) ) { $msg = "ERROR: The code does not match.."; exit(); } $rsCode = mysql_query("SELECT activation_code from subscribers where user_email='$_GET[usr]'") or die(mysql_error()); list($acode) = mysql_fetch_array($rsCode); if ($_GET['code'] == $acode) { mysql_query("update subscribers set user_activated=1 where user_email='$_GET[usr]'") or die(mysql_error()); echo "<h3><center>Thank You! This is step 2 of 3. </h3>Your email is confirmed. Please upload your C.V. now to complete step 3.</center>"; } else { echo "ERROR: Incorrect activation code... not valid"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Job application activation</title> </head> <body> <center> <br/><br/><br/> <p align="center"> <form name="form1" method="post" action="upload.php" style="padding:5px;"> <p>Re-enter you Email : <input name="email" type="text" id="email"/></p></form> <form enctype="multipart/form-data" action="upload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="4000000"> Upload your C.V.: <input name="userfile" type="file" id="userfile"> <input name="upload" type="submit" id="upload" value="Upload your C.V."/></form> </p> </center> </body> </html> --------upload.php---------- <?php session_start(); if (!isset($_GET['usr']) && !isset($_GET['code']) ) { $msg = "ERROR: The code does not match.."; exit(); } if(isset($_POST['upload']) && $_FILES['userfile']['size'] > 0) { $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; $email = $_POST['email']['user_email']; $fp = fopen($tmpName, 'r'); $content = fread($fp, filesize($tmpName)); $content = addslashes($content); fclose($fp); if(!get_magic_quotes_gpc()) { $fileName = addslashes($fileName); } include 'reg_dbc.php'; $query = "UPDATE subscribers WHERE $email = user_email (name, size, type, content ) ". "VALUES ('$fileName', '$fileSize', '$fileType', '$content')"; mysql_query($query) or die('Error, query failed'); mysql_close($dbname); } ?> <center> <br/> <br/> <br/> <br/> Thank you for uploading your <?php echo "$fileName"; ?> file, completing your registration, and providing us your C.V. for this position. <br/> <br/> <br/> We will contact you if your canditature qualifies. </center>
×
×
  • 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.