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'])...
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...
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...
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 =...
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...
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()...