Jump to content

oneplusdave

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by oneplusdave

  1. I would like to know how to incorporate or use the OpenSSL in my forms, particulary in logging in.
  2. I used $global because I would like to make the variable available at certain pages.
  3. I've checked my phpinfo.php, the error_reporting value is set to 6135, what does that mean?
  4. I am relatively new to PHP, so I need help why this script is not functioning **T if ($actionis=='Add Resource'){ //declaration of directory where files are saved if(isset($_POST['file'])) { //setting of variables $uploaddir = "resources/"; $fileName = $_FILES['userfile']['name']; $tmpName = $_FILES['userfile']['tmp_name']; $fileSize = $_FILES['userfile']['size']; $fileType = $_FILES['userfile']['type']; $fileErr = $_FILES['userfile']['error']; $filePath= $uploaddir . basename($_FILES['userfile']['name']); global $filePath; //filters extension filename $fileX = strrchr($fileName,"."); /* * UPLOAD FILTERING OPTIONS */ if ($fileSize>1000000){ die ("File too large! Must be below 1Mb."); } else{ if (($fileX==".txt")||($fileX==".doc")||($fileX==".docx")||($fileX==".pdf")||($fileX==".ppt")||($fileX==".pptx")){ if (move_uploaded_file($_FILES['userfile']['tmp_name'], $filePath)){ echo "<code>SUCCESS! File Uploaded.</code> ".$fileErr; } else{ echo "<code class='red'>Upload Failed.</code>"; } } else{ die ("Wrong file format!"); } } } The above script does not generate an error. But my problem is that I cannot save the uploaded file into my selected directory.
  5. THANK GOD! My problem was finally resolved. thank you guys for your help and suggestions. More powers!
  6. that seemed to be the problem, thanks anyway. I had a hard time configuring connection parameters, because the web host lacks sufficient info to their clients.
  7. This is the screenshot of what happened. ON the left, it shows the screenshot from the localhost, while on the right is what is seen in the webserver/internet [attachment deleted by admin]
  8. The code was supposed to display a random quote each time a page is refreshed, and I forgot to change the comment it was supposed to be #selects single row from a table, and store it in a variable for display, if failed, display an error I inserted a echo "ERROR:".mysql_error(); statement but it does not show up in the code either, it just displays "ERROR", without the error information, maybe because of the configuration of php on that webserver, that does not display errors in php code. I also checked the database connections, it was just right. what seems to be the problem? [attachment deleted by admin]
  9. This snippet was running perfectly on localhost, but after I uploaded the file containing this snippet on a webserver, the script does generate an error, or even displaying none (no results). #selects all data from table and displays it in textfields. If failed, it will display the error $sql = "SELECT * from tblquotes ORDER BY Rand() LIMIT 1"; $result = mysql_query($sql,$connection); if($result = mysql_query($sql ,$connection)) { $num = mysql_numrows($result); $count =0; while ($count < $num){ $q1 = mysql_result($result,$count,"quote"); $q2 = mysql_result($result,$count,"author"); $count++; } } else{ echo "ERROR: ".mysql_error(); } what seems to be the problem? Need help... I'm running on PHP 4.4.4 on Localhost and PHP 5.2.9 on the webserver. Mysql 4/5 on Localhost and Mysql 4.1.22 on the webserver
×
×
  • 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.