Jump to content

Paws

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Paws's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey, I am having trouble with the following sql query... $query = mysql_query("INSERT INTO `orders` (`order_status`,`productcode` ,`dispatch_date` ,`customer_id`) VALUES ('Ordered', '$item', '$date', '$email'") or trigger_error(mysql_error()); I am getting the error... Any help appreciated. Thanks
  2. I've been playing with an upload form and I want it the rename the uploaded file so you don't get files with dulpicate names. But I haven't had much sucess. if (isset($_POST['submit'])) { $target = "uploads/"; $temp_dir = $_FILES['file']['tmp_name']; $file_name = $_FILES['file']['name']; $file_type = $_FILES['file']['type']; try { if(!preg_match('/(gif|jpe?g|png|zip|css|js|psd)$/i', $file_name)) { throw new Exception('Invalid file type.'); exit; } elseif($_FILES['file']['size'] > 3000000) { throw new Exception('File is too big.'); exit; } move_uploaded_file($temp_dir, $target . $temp_dir); $status = 1; } catch(Exception $e) { echo $e->getMessage(); } } Can somebody please help me?
  3. UPDATE `info` SET `forum_name` = 'forum' AND `info`.`forum_description` = 'description'
  4. Yeah, its what it should be
  5. Ok, i've got a different problem now, when ever the user submits the forum it always puts the value as 0 in the database? :/
  6. Thanks, god I feel like an idiot now -.-
  7. <form method="post" action="adminprocess.php"> <label>Board Name <input type="text" name="forumname" value="<?php echo $info_r['forum_name']; ?>"> </label> <p> <label>Board Description <input type="text" name="forumdescription" value="<?php echo $info_r['forum_description']; ?>"> </label> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> $forumname = $_GET['forumname']; $forumdescription = $_GET['forumdescription']; $query = "UPDATE `info` SET `forum_name` = '$forumname' AND `info`.`forum_description` = '$forumdescription'"; mysql_query($query); I'm using that code to update my database but it isn't working :/ Can anyone help?
  8. Ok I'm pretty new to php and I want to make a free online games site. To do this i'm using a mysql database to store all the games. Currently I have a table called "game". And in that I have 3 fields. id to tell what game it is. Name the name of the game and location, where the game is. I want to have them all in one page (playgame?id=1) but i'm having trouble with the $_get in the mysql query. Could someone possible write up a short bit of PHP that involves getting the id from the url, querying the database and then using the mysql_fetch_array() tag to finish it off for my please. Thanks. Sorry if this is badly worded.
  9. I've done that but it neveeeeeeeer works.
  10. I'm using this login script on my site but I have a problem where it won;t connect to the SQL database. So could some nice person tell me what to name the database and what passworld to give it (for example 1234) and edit the 2 files that connect to it and PM them to me?
×
×
  • 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.