Jump to content

mindblown

Members
  • Posts

    16
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

mindblown's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am looking for a programmer that can design several custom twitter bots for me. I am willing to pay for each bot made.
  2. Hey sry I wanted to try a few more things before and I played around with some settings again in the php.ini file. It works now. I have to admit i don't know much about error reporting or about php.ini. Do you know of any videos or good articles that explain either?
  3. file count=0 array (size=0) empty I don't understand why that is happening
  4. It has also given me this error too Warning: POST Content-Length of 8655354 bytes exceeds the limit of 8388608 bytes in Unknown on line 0 But I am not sure at all how to change that limit.
  5. Yeah I'm sorry I guess i wasn't that clear in what i wanted to do. I'm trying to upload files to the server, one img and a mp3 file. Then rename and insert information about the uploaded files into a mysql database. I've since tried uploading smaller files and the script does work properly so now i know its a problem with the total size or individual sizes of the upload. I've changed a couple of things in php.ini file like the upload_max_filesize and the post_max_size but i doesnt seems to make a difference. Anyone know what i should change to get the file upload to function with larger files?
  6. Ok I have some code that's really starting to bug me... The form right under posts to a page and php picks it up and processes it. My problem is that the php will pick up the data and process it if the fields are not filled in or if only one but not both file input are selected. I want to be able to upload both at the same time.The other $POST variable post just fine but not when both $FILES are selected. P.s. I cleaned up the code a bit so its easier to read its not exactly how it is on my site please help! <form action="/administration/xxupload/" method="post" enctype="multipart/form-data"> <input type="hidden" name="artist_id" value="<?php echo $id; ?>" /> </span><input type="text" name="title" id="title" /> <span>Artwork:</span><input type="file" name="art" id="artwork"/> <span>Song:</span><input type="file" name="content" id="content"/> ><span>Details:</span><br/><textarea id="detail" name="detail" ></textarea> <input type="hidden" name="type" value="1" /> <input type="hidden" name="user" value="Admin" /> <input type="hidden" name="time" value="<?php echo time() ?>" /> <div id="tagsdiv">Tags:<input type="text" name="tags" /></div> <div id="submit"><input type="submit" name="upload_single"/></div> </form> Part of xxupload.php if (isset($_POST['upload_single'])){ $artist_id=$_POST['artist_id']; $artist_display=mysql_fetch_assoc(mysql_query("SELECT name FROM artists WHERE id=".$artist_id)); $artist_name=$artist_display['name']; $title=$_POST['title']; $tmp_art_name=$_FILES['art']['tmp_name']; $old_art_name=$_FILES['art']['name']; $dest_art="../media/singles/artwork/".$old_art_name; move_uploaded_file($tmp_art_name,$dest_art); $realart="../media/singles/artwork/".$artist_name."-".$title.".jpg"; $art="/media/singles/artwork/".$artist_name."-".$title.".jpg"; rename($dest_art,$realart); $tmp_content_name=$_FILES['content']['tmp_name']; $old_content_name=$_FILES['content']['name']; $dest_content="../media/singles/".$old_content_name; move_uploaded_file($tmp_content_name,$dest_content); $realcontent="../media/singles/".$artist_name."-".$title.".mp3"; $content="/media/singles/".$artist_name."-".$title.".mp3"; rename($dest_content,$realcontent); $detail=$_POST['detail']; $tags=$_POST['tags']; $type=$_POST['type']; $user=$_POST['user']; $tic=$_POST['time']; mysql_query ("INSERT INTO media(artist_id,title, art, content, detail,tags,user,type,tic) VALUES ('$artist_id','$title','$art','$content','$detail','$tags','$user','$type','$tic')"); header( 'Location: /administration/' ) ; } elseif
  7. Sry forgot about this post! I changed the limits and everything but I gave up on that for the moment. I moved on to other things in hopes that if i run into another problem that it will give me an idea on what is overall wrong. Don't know if that makes sense but thnx!
  8. Thanks! but this one only works with pictures and other files but not video its giving me an ( ! ) Notice: Undefined index: pictu in C:\wamp\www\closer\get1.php on line 5 Call Stack # Time Memory Function Location 1 0.0013 145176 {main}( ) ..\get1.php:0 ( ! ) Notice: Undefined index: title in C:\wamp\www\closer\get1.php on line 6 Call Stack # Time Memory Function Location 1 0.0013 145176 {main}( ) ..\get1.php:0 error. Any ideas? <?php error_reporting(-1); $conn = mysql_connect('localhost', 'root', '') or die(mysql_error()); $db_name = mysql_select_db('project', $conn) or die(mysql_error()); $img = $_FILES["pictu"]["name"]; $imgTitle = $_POST['title']; if (!empty($img)) { $imgName = $_FILES["pictu"]["name"]; $deuce = "upload/" . $imgName; if (move_uploaded_file($_FILES['pictu']['tmp_name'], $deuce)) { $sql = sprintf("INSERT INTO media (`Name`, `pic`) VALUES('%s','%s')", mysql_real_escape_string($imgTitle), mysql_real_escape_string($imgName)); $result = mysql_query($sql) or die(mysql_error()); printf("Inserted records: %d\n", mysql_affected_rows()); mysql_close($conn); } else { echo 'Moving file upload failed!'; exit; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <form action="get1.php" method="post" enctype="multipart/form-data"> <input type="text" name="title" /><br/> <input type="file" name="pictu" /><br/> <input type="submit" name="Sumber" value="ClickClack" /> </form> </html>
  9. i wrote an a simple upload form and then another php file to process the form. the form works on all the files i have tried to upload except for videos. Can anyone tell me what's going on? I'm getting undefined index errors when trying to upload videos but not pictures. Here are my scripts (index.php) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <form action="get.php" method="post" enctype="multipart/form-data"> <input type="text" name="title" /><br/> <input type="file" name="pictu" /><br/> <input type="submit" name="Sumber" value="ClickClack" /> </form> </html> (get.php) <?php $fist=$_FILES["pictu"]["tmp_name"]; $deuce= "upload/" . $_FILES["pictu"]["name"]; $con = mysql_connect("localhost","root",""); move_uploaded_file($fist,$deuce); $select= mysql_select_db("project", $con); $sql="INSERT INTO media (Name, pic) VALUES('".$_POST['title']."', '".$_FILES['pictu']['name']."')"; $poster=$_POST['Sumber']; echo "Stored in: " . "$deuce"; if(isset($poster)) {$con; $slect;} if (!$con) {echo('Could not connect: ' . mysql_error());} if (!mysql_query($sql,$con)) {echo('Error: ' . mysql_error());} mysql_close($con); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <iframe src="<?php echo "$deuce" ?>"> </iframe> </body> </html>
  10. do you mean <?php ?> because i put those i just forgot them in the copy paste
  11. what code tags and quotes around which strings
  12. Im trying to upload a file into my table in mysql and it giving me this error " Notice: Undefined index: pictu in C:\wamp\www\closer\get.php on line 13" I know this is basic stuff but i don't understand the error and why its giving me it. Any help would be great. //////////////////// the index.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <form action="get.php" method="post" enctype="multipart/form-data"> <input type="text" name="title" /><br/> <input type="file" name="Pictu" /><br/> <input type="submit" name="Sumber" value="ClickClack" /> </form> </html> //////////////////////// the get.php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("project", $con); $sql="INSERT INTO media (Name, pic) VALUES ('$_POST[title]','$_POST[pictu])"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con);
  13. I would love to hear the answer to this one too.
  14. well i want to create a feed where everything in the feed would be embedded in its own location. Maybe I'm wrong in calling it its own page but i what a seperate url for everything uploaded. Any suggestions?
×
×
  • 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.