Search results

  1. S

    is there a code that only allows pdf file in uploading in php?

    is there a restriction code using php that only allows pdf files to be uploaded? here's my code that allows png files only: if ($type == "image/png") { $loaddir='upload/'; $image =$loaddir.basename($_FILES['userfile']['name'])...
  2. S

    what should i do with this code in php?

    im having trouble with this, here's some part of code which i have error: <?php $hob= array("major" => array(1=> "Life", 2=>"Love",3=>"Family")); echo 'Hob : '; echo '<select name=hob>'; echo '<option>'; echo $hob["major"][1]; echo '</option>'; echo...
  3. S

    how to display items in two different table in php?

    i need help with this code, i have two tables(tbl_title and tbl_author). i want to display both title and the author, can anyone help me? here's my code: <?php include 'conn.php'; $search=$_POST['search']; $sy=explode('-',$search); $result = mysql_query ("SELECT * FROM `tbl_title` WHERE...
  4. S

    someone know how to use update in php?

    im using the update code in php., im somewhat lost with this one., can anyone help me? this code can save data but once i select "Edit" theres an error (Failed to edit: Query was empty) need help with update <?php include 'conn.php'; $flag=$_GET["flag"]; if ($flag=="1") { $id =...
  5. S

    why im having an error in php?

    im having this error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\update.php on line 65... why? <?php include 'conn.php'; $flag=$_GET["flag"]; if ($flag=="1") { $studnum = $_GET["studnum"]; $del = "DELETE FROM newdbase WHERE...
  6. S

    how can i add update in my php code?

    this code can delete rows., my question is how can i add update here's the code: <?php include 'conn.php'; $flag=$_GET["flag"]; if ($flag=="1") { $id = $_GET["id"]; $del = "DELETE FROM newdbase WHERE id='$id'"; $nres = mysql_query($del); if(!$nres) { echo " Failed to delete: ".mysql_error()...
Back
Top