
johnseito
Members-
Posts
138 -
Joined
-
Last visited
Everything posted by johnseito
-
Hello all, I was wondering if anyone can help me with putting this code in php. images is the directory, and John-Coltrane.jpg is the pic in the directory. So how can I do this if I am trying to get the img out of the directory onto the browser with php. would it be like this? Echo "<img src=images/$info['photo']/><br>"; images is the directory and $info['photo'] is the name of the img in the sql database, I did this and it doesn't work, any advise? thanks
-
Does it work for you? you talked as if you have it done
-
I did that, it didn't work.
-
I changed all the php.ini files to this and it still doesn't work Operating system ---- vista php version --------- PHP 5.2.3 apache version - -----http server 2.2.4 It just doesn't upload it, it pretty much gives me an error, because in my code if it doesn't do this if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) it will give me an error. When it upload successfully I will not see the error and I can see the file uploaded in the directory.
-
No, it doesn't work. any other ideas?
-
No, it doesn't work.
-
is there a way to upload excel docs or music docs that you know how to? I put excel docs like this but it doesn't work. thanks
-
But I do have a question if you know that would be great. I can only upload file size that are under 2mb, anything above that doesn't works. How can I do to change this, I changed the php ini to allow 300mb and it doesn't do any good. thanks
-
Ok I noticed something. I was missing these codes.. sometimes example codes are never completed. $uploaded_type = $_FILES['uploaded']['type'];
-
Here is what I have.
-
Yup, I changed it to how you have it and it still doesn't work.
-
I created a upload form to upload only a JPEG file type but it doesn't seem to work even if the file I upload is JPEG. Quote: if (($uploaded_type=="image/jpeg")) { anyone know what is wrong here? thanks
-
Thanks for the site, it just explains everything, doesn't really tells me what to do or how to fixed this problem. it even show me this code http://www2.radinks.com/upload/examples/upload.php.txt I load this up and I don't see anything.
-
Hello all, I created a form and a upload php to upload files in a directory but it seems that I can only upload files to a certain size limit, when files are 20mb it doesn't seem to do it. I went to php and set the upload size to 300mb and still it doesn't do it, but I could do this in my hosting company's directory and using their php but it just takes longer. why is that and how can I do this locally without it failing? thanks
-
Hello all, I created a form and a upload php to upload files in a directory but it seems that I can only upload files to a certain size limit, when files are 20mb it doesn't seem to do it. I went to php and set the upload size to 300mb and still it doesn't do it, but I could do this in my hosting company's directory and using their php but it just takes longer. why is that and how can I do this locally without it failing? thanks
-
display images <img src =\"" . $row['user_image']."\">
johnseito replied to johnseito's topic in PHP Coding Help
Ok, thanks for your response. I created a table in MySQL called pix like this: Create table pix ( Pid int primary key not null auto_increment, Title text, Imgdata longblob); I know how to store the photo correctly into the pix table, but I couldn’t get all the uploaded photo out. I could only get one, the lastest one uploaded. And I couldn’t upgrade the code to do just that because of this: if ($_REQUEST[gim] == 1) { header("Content-type: image/jpeg"); print $bytes; exit (); } <img src=?gim=1 width=1000 height=1000><br> The gim==1 is what determines the photo to appear. I don’t know why is it gim ==1. So could you tell me why is src gim =1 or how I can change this code to show all photo uploaded instead of just 1. Thanks - -
Hello all, People say that this code is suppose to work: while($row = mysql_fetch_array($query)) { echo "<tr>"; echo "<td><img src =\"" . $row['user_image']."\"></td>"; echo "</tr>"; it should bring out all your images/photo. I tried this code and no photo appear, just the icon, and when you upload one photo it seems that 3 icon will pop out as if there is 3 photo for every upload. but when I do it like this, Code: $row = mysql_fetch_assoc($query); $bytes = $row[imgdata]; $row = mysql_fetch_assoc($query); $bytes = $row[imgdata]; <center><img src=?gim=1 width=1000 height=1000><br> <!--144--> it works but it only brings out one photo. I want it to bring out all photo, imgdata is the field in mysql that stores the pictures. any help would be great. thankst
-
Ok I got that, now a couple of things if you could offer some advice on. 1- I have the codes to upload pix and show them in the browser, but in only does it for one pix at a time and the last one uploaded. I would like to show all the pixs in the database with the last one uploaded showed last, I tried for the past two days to do this but haven't found any solution. if you have any let me know. 2 - do you know if or the codes to upload music and excel files to the database and show them on the browser? I was thinking that maybe I should do it as I did it for pix and change it to xls for excel docs, etc. thanks
-
Hi I just noticed why some picture can't be uploaded, because some of those pictures files size are too large, about 600kb or 1.2 mb. I currently can only upload about 17 kb, how can I increase this capacity so that I can upload all my pictures? thanks
-
I want to show the files in the browser, the image of it. I created one and it works but it doesn't work for all pictures, it doesn't show all pictures only some. Do you know why that is? I also would like to upload music and ms doc (mostly excel) files, so how would I select these and view them on the browser?
-
cooldude832 thanks for the site Ok if it can store up to 4gb, how can i make it store more if in the end I want to? and I read the site provided by rhodesa, it said blob only stores . rhodesa thanks for the site, I will read more about it.
-
Thanks.. so far I have no clue what this field is. Can you show me a link that would give me more information on this?
-
Hello everyone, I have a question with upload files. I create a html form and php codes to upload files. I also created a directory called uploads where my php upload files resides. when I upload it, all the files goes to the uploads directory. so my question is when I upload can it be save into mysql and then I can bring it out and show it in the browser instead of how i have it in the directory. How would I do this? I really want to show what I upload in the browser/server. thanks -
-
I wrote this code $conn =mysql_connect("localhost","TEST1","TEST"); mysql_select_db("test",$conn); if (!(isset($pagenum))) /*isset() functions for testing the status of a variable. This function takes a variable name as an argument and returns true if it exists and false otherwise. you can also pass in a comma separated list of variables, and isset() will return true if all the varaibles are set. */ { $pagenum = 1; } $data ="SELECT name, message from info"; $rows = mysql_num_rows($data, $conn); print"<font size=10000>$rows</font>"; //$rows=mysql_query($data, $conn); $page_rows = 4; $last = ceil($rows/$page_rows); if ($pagenum < 1) { $pagenum = 1; } elseif ($pagenum > $last) { $pagenum = $last; } $max = 'limit ' .($pagenum - 1) * $page_rows .',' .$page_rows; $data_p = mysql_query($data, $conn) or die(mysql_error()); while ($info = mysql_fetch_array($data_p)){ echo "{$info['name']} wrote:<br>"; echo "{$info["message"]}"; } echo "<p>"; echo " --Page $pagenum of $last-- <p>"; // First we check if we are on page one. If we are then we don't need a link to the previous page or the first page so we do nothing. If we aren't then we generate links to the first page, and to the previous page. if ($pagenum == 1) { } else { echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=1'> <<-First</a> "; echo " "; $previous = $pagenum-1; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$previous'> <-Previous</a> "; } //just a spacer echo " ---- "; //This does the same as above, only checking if we are on the last page, and then generating the Next and Last links if ($pagenum == $last) { } else { $next = $pagenum+1; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$next'>Next -></a> "; echo " "; echo " <a href='{$_SERVER['PHP_SELF']}?pagenum=$last'>Last ->></a> "; } ?> <HTML> <HEAD> <TITLE>WEB BLOG</TITLE> </HEAD> <BODY> <H1>Add an Entry</H1> <form method="POST" action="pagination2.php"> <p> <input type="text" name="name" value= "rrrr" size=55><br> <b><small>NAME:</small></b><br></p> <b>MESSAGE:</b><br> <textarea name="message" cols="60" rows="6"></textarea> <br> <input type="submit" name="submit" value="Submit"> </form> </BODY> </HTML> it doesn't seem to work as plan. there are the -Page 0 of 0-- <<-First <-Previous ---- link to click on but that is it, I click first/previous and it does nothing, also it shows all the data output. Anyone have any ideas what is wrong here. thanks
-
thanks i'll take a look at it.