#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    40
    Rep Power
    0

    Uploading Image with other details.


    I am trying to upload image with some other input data but , when i submit the form it takes me to action page.. i need help.
    can anyone tell me a way to do this?
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Originally Posted by sunny1234567890
    can anyone tell me a way to do this?
    Change line 731. Or maybe use recursion.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    40
    Rep Power
    0
    Sorry which line and where??
  6. #4
  7. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014


    That was a tiny hint that we might need a bit more information. Something like ... code. And a concret problem description.

    I know it would be great if we could just remotely access your brain and get all the necessary info. But unfortunately, we still need you to actually write them down.
    Last edited by Jacques1; November 8th, 2013 at 05:35 AM.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    40
    Rep Power
    0
    Code:
    <div id="formContainer">     
    <form id="showCaseUpload" method="post" action="up.php" enctype="multipart/form-data">            
     Image Title:<br/>             
    <input type="text" name="imageTitle" /><br/>            
     Url:<br/>  <input type="text" name="url" />
    Location:          
    <input type="text"  name="location"/><br/>             
    Type<br/>        
    <input type="radio" name="type" value="show">
    Show<br>             
    <input type="radio" name="type" value="video">
    Video<br/>             
    <br/>ShowId:<br/>             
    <input type="text"  name="showId"/>
    <br/>VideoId:<br/>             
    <input type="text"  name="videoId"/><br/>             
    <br/>Please Upload a Photo 35kb.             
    Photo:             
    <input type="file"  name="photo">             
    <?php echo '<input type="hidden" name="db" id="db" value="'.$channel.'">'; ?>             
    <br/>Description:<br/>             
    <textarea rows="5" cols="25"  name="description">       
    </textarea>       
    <input TYPE="submit" name="upload" title="add To Showcase" value="addToShowcase"/>    
    </form>        
    </div>



    Code:
    $("#FormSubmit").click(function (e) { 
    			e.preventDefault(); 
    if($("#contentText").val()==='' || $("#title").val()==='' ||$("#url").val()==='' || $("#location").val()==='') 	
    { 				
                   alert("Please enter some text!"); 				
                   return false; 			
    } 		 	
    var contentText = $("#contentText").val(); 		 	
    var title = $("#title").val(); 		 	
    var url = $("#url").val(); 		 	
    var location = $("#location").val();  			
    var file = $("file").val(); 			
    var db = $("#db").val(); 			
    var dataString = 'contentText='+ contentText + '&title=' + title + '&url=' + url + '&location=' + location + '&db=' + db; 			 			
    jQuery.ajax({ 			
    type: "POST",  			
    url: "response.php",  			 			
    data: dataString, 			
    success:function(response)
    { 				$("#responds").append(response); 				$("#contentText").val('');  				$("#url").val(''); 				$("#title").val(''); 				$("#location").val('');  			
    }, 			
    error:function (xhr, ajaxOptions, thrownError){ 
    				alert(thrownError); 
    
    			} 			
    }); 	
    });

    How do i upload image.

IMN logo majestic logo threadwatch logo seochat tools logo