Why is this code won't work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tharindu96
    New Member
    • Jan 2012
    • 16

    Why is this code won't work

    Code:
    $itarget = "images/";
    							$ftarget = "files/";
    							$idir = $itarget.$image['name'];
    							$fdir = $ftarget.$file['name'];
    							$gquery = "INSERT INTO `games` VALUES ('','".$name."','".$content."','".$idir."','".$fdir."','','')";
    							if(mysql_query($gquery)){
    								$itarget = $itarget.basename($image['name']);
    								$ftarget = $ftarget.basename($file['name']);
    								if((move_uploaded_file($image['tmp_name'],$itarget))&&move_uploaded_file($file['tmp_name'],$ftarget)){
    									echo '<h1>Success!</h1>';
    								}else{
    									echo 'sorry';	
    								}
    							}else{
    								echo '0';	
    							}
  • PsychoCoder
    Recognized Expert Contributor
    • Jul 2010
    • 465

    #2
    What is it doing versus what you're wanting it to do. Simply saying "it wont work" makes it very difficult to help find a solution.

    Comment

    • tharindu96
      New Member
      • Jan 2012
      • 16

      #3
      I found the problem it was with the phpmyadmin table

      Comment

      Working...