473,516 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why is this code won't work

16 New Member
Expand|Select|Wrap|Line Numbers
  1. $itarget = "images/";
  2.                             $ftarget = "files/";
  3.                             $idir = $itarget.$image['name'];
  4.                             $fdir = $ftarget.$file['name'];
  5.                             $gquery = "INSERT INTO `games` VALUES ('','".$name."','".$content."','".$idir."','".$fdir."','','')";
  6.                             if(mysql_query($gquery)){
  7.                                 $itarget = $itarget.basename($image['name']);
  8.                                 $ftarget = $ftarget.basename($file['name']);
  9.                                 if((move_uploaded_file($image['tmp_name'],$itarget))&&move_uploaded_file($file['tmp_name'],$ftarget)){
  10.                                     echo '<h1>Success!</h1>';
  11.                                 }else{
  12.                                     echo 'sorry';    
  13.                                 }
  14.                             }else{
  15.                                 echo '0';    
  16.                             }
  17.  
Mar 4 '12 #1
2 1374
PsychoCoder
465 Recognized Expert Moderator Contributor
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.
Mar 4 '12 #2
tharindu96
16 New Member
I found the problem it was with the phpmyadmin table
Mar 4 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
1538
by: michaaal | last post by:
I am trying to run this code on a Windows 2003 Server. I have ASP enabled. Any idea why it doesn't work? <% newDB = "new.mdb" newDB = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & newDB Set cat = CreateObject("ADOX.Catalog") cat.Create newDB
2
1327
by: A. Saksena | last post by:
Hi all, Why this code does't work!! ======================== #include <iostream> template<typename T> class a { public: typedef T var; };
5
2205
by: LRW | last post by:
(Sorry if this is a repost...my newsreader keeps crashing on the posting--I don't know if the message going out or not) For some reason this javascript just won't work in Firefox. It works fine in IE, though. I know, IE is a bit more permissive than IE, and sometimes lets errors work when they shouldn't. But from what I can see, I just...
5
1343
by: Jacky Luk | last post by:
Hi, I have just installed IIS on my XP SP2 machine. This code (dreamweaver) doesn't work <%@ LANGUAGE="VBSCRIPT" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=big5">
5
325
by: Bob | last post by:
Hi Everybody I think I have lost a few brain cells tonight. Can anyone see why this doesn't work. I have tried it all ways Private Sub Form_Current() If Me!MemoWrite Is Null Then Me!CmdEmail.Visible = False
3
1602
by: Motion Musso aka: Sathia | last post by:
function up(bpid) { image = document.getElementById('up_'+bpid); image.setAttribute('SRC','/templates/images/yespulse.gif') up_down('/up_down.php?bpid=' + bpid + '&action=up'); image.setAttribute('SRC','/templates/images/rated_up.gif')
6
12152
by: spooky | last post by:
hii guyzz Im doing a project which requires that i have a drop down for the country and i require to populate another drop down for state.
3
1691
by: Abubakar | last post by:
Hi, I created 2 functions which run in seperate threads. what they do simply is that thread1 starts and does something while the thread 2 waits for it. Then after thread1 is done, it resumes the second thread by calling SetEvent and itself goes into wait condition by calling WaitForSingleObject(). Now Thread 2 does something and when its...
1
1830
by: damiensawyer | last post by:
Hi, I've recently moved up to Framework 3.5. For some reason, a method signature on dataAdaptor.fill that used to work has stopped. DataTable oDT = new DataTable(); SqlDataAdapter oDA = new SqlDataAdapter(SQLLoadString, clsGlobalFunctions.oSQLConnection); oDA.Fill(oDT, "Movies"); //Error
0
7276
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7581
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7548
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.