Jump to content

MaryamJamil

New Members
  • Posts

    3
  • Joined

  • Last visited

MaryamJamil's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. mysql will be removed in future. Kindly use mysqli
  2. Hello I am using the code: <?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } if ( ($_FILES["file"]["size"] < 25000) ) { if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } } else { echo "Invalid file"; } echo "<br>".'2'."<br>"; if (($_FILES["file"]["size"] < 25000) ) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { $success= move_uploaded_file($_FILES["file"]["tmp_name"], $_FILES["file"]["name"]); if($success){ echo "success Stored in: " . $_FILES["file"]["name"]; } } } } else { echo "Invalid file"; } ?> This is properly working on my local host but not working on the server which I am using this line $success= move_uploaded_file($_FILES["file"]["tmp_name"], $_FILES["file"]["name"]); is not working kindly help me thanks
  3. I need help I am retrieving rows from MySQL table now what I want is that as rows retrieved with each row and edit button will insert but i don't know how to insert here is my code <?php require('connect.php'); session_start(); $query="SELECT * FROM project WHERE projectstatus='Open'"; $result=mysql_query($query); $num=mysql_numrows($result); $i=0;$j=1; while ($i < $num) { $projectid=mysql_result($result,$i,"projectid"); $fkey=mysql_result($result,$i,"fkey"); $paying=mysql_result($result,$i,"paying"); $completionmonth=mysql_result($result,$i,"completionmonth"); $completiondate=mysql_result($result,$i,"completiondate"); $personspecify=mysql_result($result,$i,"personspecify"); $projecttitle=mysql_result($result,$i,"projecttitle"); $categories=mysql_result($result,$i,"categories"); $tools=mysql_result($result,$i,"tools"); $shortdescription=mysql_result($result,$i,"shortdescription"); $date=mysql_result($result,$i,"date"); $time=mysql_result($result,$i,"time"); $i++; echo "<br>".$j."<br>"; echo "<br>".$projectid."<br>"; echo "<br>".$fkey."<br>"; echo "<br>".$paying."<br>"; echo "<br>".$completionmonth.' month '.$completiondate.' days '."<br>"; echo "<br>".$personspecify."<br>"; echo "<br>".$projecttitle."<br>"; echo "<br>".$categories."<br>"; echo "<br>".$tools."<br>"; echo "<br>".$shortdescription."<br>"; echo "<br>".$date."<br>"; echo "<br>".$time."<br>"; echo "<br>"."<br>"."<br>"; // I want to insert edit button here but dont know how echo "------------------------------------------------------------------------"."<br>"; $j++; } ?> </body> </html>
×
×
  • 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.