Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7745513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:02:35+00:00 2026-06-01T10:02:35+00:00

I want to get this image uploading script right, but for whatever reason it

  • 0

I want to get this image uploading script right, but for whatever reason it doesn’t like the description input. It was working perfectly before I added the description input and I can’t think of what might be wrong because it looks fine. My code doesn’t like the description input in the form, what is wrong? Thanks for the help!

HTML Form

<h1>Image Gallery</h1>  
 <form enctype="multipart/form-data" action="upload.php" method="POST">
 Please choose a file: <input name="uploaded" type="file" /><br />
 Description: <textarea maxlength="255" name="description" id="description"></textarea><br />
 <input type="submit" value="Upload" />
</form> 

PHP Code (There is code before this but it doesn’t matter)

$userid = mysql_real_escape_string($_SESSION['UserID']);  
$imageid = mysql_real_escape_string($i);  
$image = mysql_real_escape_string($rename); 
$description = mysql_real_escape_string($_POST['description']); 
$registerquery = mysql_query("INSERT INTO imageupload (UserID, ImageID, Image, Description) VALUES('".$userid."', '".$imageid."', '".$image."', '".$description."')");  
 if($registerquery) {  
  header( 'Location: manage.php' ) ;
 }  
 else {  
  echo "<h1>Error</h1>";  
  echo "<p>Sorry, an error occured. Please go back and try again.</p>";  
 }   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T10:02:36+00:00Added an answer on June 1, 2026 at 10:02 am

    What datatype is the column for description?

    Replace your current query with:

    $description = mysql_real_escape_string(strip_tags(stripslashes($_POST['description']))); 
    $register = "INSERT INTO imageupload (UserID, ImageID, Image, Description) VALUES('$userid', '$imageid', '$image', '$description')";
    
    $registerquery = mysql_query($register) or die (mysql_error()); 
    
    
     if($registerquery) {  
      header( 'Location: manage.php' ) ;
     }  
    
     else {  
      echo "<h1>Error</h1>";  
      echo "<p>Sorry, an error occured. Please go back and try again.</p>";  
     }   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have Image like this (source: de-viz.ru ) I want to get something
So I have Image like this (source: de-viz.ru ) I want to get something
I want to get a window like this How should i get this and
document.onkeydown.toString() returns onkeydown function but I only want to get this function's name. Is
I've been struggling for quite a while to get this feature working: I want
I want to get this straight. I know what DLL's are. I have done
I can't get this to work.. I have an String which I want to
i want to get the value of this td my code function check() {
I want to get rid of the timestamp in this returned string. I am
Currently I have an image like this (created by CKEditor): <img src=foo.jpg style=float: left;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.