
anf.etienne
Members-
Posts
82 -
Joined
-
Last visited
Never
Everything posted by anf.etienne
-
hi, ive got this piece of coding that generates a table with images and a link to edit the images. I need the links to redirect to a iframe on my page but when i add the code in to redirect it only shows that it is calling a javascript function rather than actually linking i.e. javascript:loaditFrame(iframeresize, <?php for($i=0; $i<5; $i++){ if($i != 0){ $start = $start + $max_items; $end = $end + $max_items; } echo "<td>"; for($x = $start; $x < $end; $x++){ $imageL= $path.$item[$x]; $img_path="http://ve-creative.com/test/8/$imageL"; // display the item echo '<center><p><img src= "'.$path.$item[$x] .'" height="100" width="100"></p></center>'; echo "<a href="'javascript:loadintoIframe(iframeresize, demo2_edit.php?img=$img_path)'">[Edit / resize]</a><br>"; } echo "</td>"; } ?>
-
can anyone help at all or is this just going to be another waste of time???
-
Hi, I have asked before but never got an answer from anyone...so im trying again as i am a newbie and really could do with some help... I have made a upload form to upload images and then edit it, i have add the codes below in order that it operates and ill add titles to it so you know what you are looking at. I'd just like to know where i was made a mistake. Thank you in advance UPLOAD FORM- this is what i use to upload the images and also once they are uploaded to produce a link for each image to edit them using webresizer. <tr> <td colspan="2"><div align="center"><strong>NOTE:</strong> Please save your listing NOW before you upload your pictures</div> <!--mult.pictures--> <script type="text/javascript" src="js/jquery-1.2.6.js"></script> <script> <!-- $(document).ready(function(){ $("#generate").click(function(){ //xxxxxxxxx //$("#quote").show("slow"); //$("#quote p").load("demo2_edit.php"); //grayOut(true, {'zindex':'0', 'bgcolor':'#000000', 'opacity':'90'}); }); }); function editImage(id) { //window.open('demo2_edit.php?img='+$imageL,'res','width=800, height=700, scrollbars=1'); $("#quote").show("slow"); document.getElementById("iframeresize").src='demo2_edit.php?img='+$imageL; //$("#quote").load("demo2_edit.php?img="+$imageL); //grayOut(true, {'zindex':'50', 'bgcolor':'#000000', 'opacity':'90'}); } function cancelEdit() { document.getElementById("iframeresize").src=''; $("#quote").hide("slow"); } --> </script> <style> #quote { display:none; width:650px; height:1100px; border:2px solid #000000; background-color:#ebebeb; z-index:1000; } #quotewrapper { } </style> <div id="quotewrapper"> <div id="quote"> <div> <iframe src="" frameborder="0" width="100%" height="100%" id="iframeresize"></iframe> </div> <div style="margin:10px; text-align:center;"><a href="javascript:cancelEdit();">[Cancel Image editing]</a></div> </div> </div> <p> <a href="javascript:showhide('div_viewimages');">[View Images]</a></p> <div id="div_viewimages" style="border:1px solid #999999; margin-bottom:10px; padding:5px;"> <?php $folderPath= $id; $path = "$folderPath"; // path to the directory to read ( ./ reads the dir this file is in) if ($handle = opendir($path)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if(!is_dir($file)){ $item[] = $file; } } } closedir($handle); } $total_items = count($item); $max_items = ceil($total_items / 5); // items per <td> $start = 0; $end = $max_items //generate the table ?> <center> <table width="500px" border="0" cellspacing="0" cellpadding="2" align="center"> <tr> <?php for($i=0; $i<5; $i++){ if($i != 0){ $start = $start + $max_items; $end = $end + $max_items; } echo "<td>"; for($x = $start; $x < $end; $x++){ $imageL= $path.$item[$x]; // display the item echo '<center><p><img src= "'.$path.$item[$x] .'" height="100" width="100"></p></center>'; echo "<a href=javascript:editImage('$imageL')>[Edit / resize]</a><br>"; } echo "</td>"; } ?> </tr> </table> </div> <!--end:mult.pictures--> <table width="100%" border="0" cellpadding="5"> </table><p> <a href="javascript:showhide('div_uploadnewimages');">[upload New Images]</a></p> <div id="div_uploadnewimages" style="border:1px solid #999999; margin-bottom:10px; padding:5px;"> <p><strong>Upload new images</strong></p> <p> <label> </form> </label> <br /> <script language="javascript" type="text/javascript"> function addField() { var tbody = document.getElementById("tblBody"); var ctr = tbody.getElementsByTagName("input").length + 1; var input; if ( ctr > 75 ) { alert ("The maximum number of images has been reached."); }else{ if (document.all){ //input.name doesn't work in IE input = document.createElement('<input name="images[]">'); }else{ input = document.createElement('input'); input.name = "images[]"; } input.id = input.name; input.type = "file"; input.value = ""; input.className = "images[]"; var cell = document.createElement('td'); cell.style.height = '30px'; cell.appendChild(document.createTextNode(ctr+". ")); cell.appendChild(input); var row = document.createElement('tr'); row.appendChild(cell); tbody.appendChild(row); window.document.the_form.count.value = ctr; } } </script> <body> <form name="the_form" id="the_form" method="POST" action="addimgck.php" enctype="multipart/form-data"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody id="tblBody"> <tr> <td height="30"> 1. <input name="images[]" type="file" class="imgfield" id="field_1" /> </td> </tr> <tr> <td height="30"> 2. <input name="images[]" type="file" class="imgfield" id="field_2" /> </td> </tr> <tr> <td height="30"> 3. <input name="images[]" type="file" class="imgfield" id="field_3" /> </td> </tr> <tr> <td height="30"> 4. <input name="images[]" type="file" class="imgfield" id="field_4" /> </td> </tr> <tr> <td height="30"> 5. <input name="images[]" type="file" class="imgfield" id="field_5" /> </td> </tr> <tbody </table> <input name="count" type="hidden" id="count" value="4"/> <input name="add" type="button" class="button" id="add" value="Add Image(s)" onClick="addField();"/> <input name="Upload Image(s)" type="submit" value="Upload Image" /> </form> </p> </div> PROCESSING- once the images have been selected and they hit upload image this code processes the images <?php session_start(); $imageL = $_GET['img']; $_SESSION['FILEPATH'] = $imageL; ?> <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>Multiple image upload script from plus2net.com</title> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> <? $random_digit=rand(0000000000,9999999999); $folderIn=mkdir("upload/$random_digit", 0777); ?> <? while(list($key,$value) = each($_FILES['images']['name'])) { if(!empty($value)) { $filename = $value; $filename=str_replace(" ","_",$filename);// Add _ inplace of blank space in file name, you can remove this line $add = "upload/$random_digit/$filename"; //echo $_FILES['images']['type'][$key]; // echo "<br>"; copy($_FILES['images']['tmp_name'][$key], $add); chmod("$add",0777); $full_path="http://ve-creative.com/test/8/"; $folderPath="upload/$random_digit/"; } } ?> <?php $id="$folderPath"; include "templateEdit.php"; ?> <? $username="vecre0_tempU"; $password="auction"; $database="vecre0_templates"; // OPEN CONNECTION ---> $connection=mysql_connect("localhost","$username", "$password") or die("Unable to connect!"); mysql_select_db("$database") or die("Unable to select database!"); // EXECUTE QUERY ---> $query="INSERT INTO paths ( folderPath) VALUES( '".$folderPath."')"; //////-----> $result=mysql_query($query) or die("Error in query:".mysql_error()); //if ($result) //echo mysql_affected_rows()." row inserted into the database effectively."; // CLOSE CONNECTION ---> mysql_close($connection); ?> </body> </html> once it has been processed it returns to the original coding to this below <table width="500px" border="0" cellspacing="0" cellpadding="2" align="center"> <tr> <?php for($i=0; $i<5; $i++){ if($i != 0){ $start = $start + $max_items; $end = $end + $max_items; } echo "<td>"; for($x = $start; $x < $end; $x++){ $imageL= $path.$item[$x]; // display the item echo '<center><p><img src= "'.$path.$item[$x] .'" height="100" width="100"></p></center>'; echo "<a href=javascript:editImage('$imageL')>[Edit / resize]</a><br>"; } echo "</td>"; } ?> </tr> </table> it generates links to edit and resize the image for the javascript. I personally think that i have edited the javascript to load a iframe with the webresizer. That is this code <script type="text/javascript" src="js/jquery-1.2.6.js"></script> <script> <!-- $(document).ready(function(){ $("#generate").click(function(){ //xxxxxxxxx //$("#quote").show("slow"); //$("#quote p").load("demo2_edit.php"); //grayOut(true, {'zindex':'0', 'bgcolor':'#000000', 'opacity':'90'}); }); }); function editImage(id) { //window.open('demo2_edit.php?img='+$imageL,'res','width=800, height=700, scrollbars=1'); $("#quote").show("slow"); document.getElementById("iframeresize").src='demo2_edit.php?img='+$imageL; //$("#quote").load("demo2_edit.php?img="+$imageL); //grayOut(true, {'zindex':'50', 'bgcolor':'#000000', 'opacity':'90'}); } function cancelEdit() { document.getElementById("iframeresize").src=''; $("#quote").hide("slow"); } --> </script> <style> #quote { display:none; width:650px; height:1100px; border:2px solid #000000; background-color:#ebebeb; z-index:1000; } #quotewrapper { } </style>
-
Hi, I have created this site http://www.ve-creative.com/test/8/templateEdit.php...it has a upload form for images you can add as many as required etc etc....I have a issue with this though, feel free to look at the coding on the page. The problem is im trying to intergrate webresizer with it, I have webresizer working but for some reason i can't get the images to load into webresizer.....could anyone take a look at my coding and see where im going wrong? you can take a look at the files seperately if you use this link to access the folder http://www.ve-creative.com/test/8/ thanks in advance
-
THANK YOU FOR ALL THE HELP
-
hi im a newbie at all this, i just needed a simple way to pass a random generated number from 1 page to the next and once it submitted for that number to go back to the 1st page so i can continue to use it. i have been reading different sites and forums and so far i think session, get or post might be the best solution....i have no data that i want to protect. I am just wary of how to actually get them to pass the variable to the submit page and back to the 1st page once it redirects back
-
what is the best way to transfer variables from 1 php fle to another?
-
ok its worked but now it has enlarged all the text and text boxes on my page even when i've add the css files to the coding i previously showed you it does nothing
-
i have just got the following message Warning: Cannot modify header information - headers already sent by (output started at /home/vecre0/public_html/test/8/addimgck.php:10) in /home/vecre0/public_html/test/8/addimgck.php on line 67 here is my coding....what have i done wrong? <!doctype html public "-//w3c//dtd html 3.2//en"> <html> <head> <title>Multiple image upload script from plus2net.com</title> </head> <body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000"> <? $random_digit=rand(0000000000,9999999999); $folderIn=mkdir("upload/$random_digit", 0777); ?> <? while(list($key,$value) = each($_FILES['images']['name'])) { if(!empty($value)) { $filename = $value; $filename=str_replace(" ","_",$filename);// Add _ inplace of blank space in file name, you can remove this line $add = "upload/$random_digit/$filename"; //echo $_FILES['images']['type'][$key]; // echo "<br>"; copy($_FILES['images']['tmp_name'][$key], $add); chmod("$add",0777); $full_path="http://ve-creative.com/test/4/$random_digit/$filename<br />"; $folderPath="http://ve-creative.com/test/4/$random_digit"; } } $id= "$random_digit"; header ("Location templateEdit.php?id=$id"); ?> <? $username="vecre0_tempU"; $password="auction"; $database="vecre0_templates"; // OPEN CONNECTION ---> $connection=mysql_connect("localhost","$username", "$password") or die("Unable to connect!"); mysql_select_db("$database") or die("Unable to select database!"); // EXECUTE QUERY ---> $query="INSERT INTO paths ( folderPath) VALUES( '".$folderPath."')"; //////-----> $result=mysql_query($query) or die("Error in query:".mysql_error()); //if ($result) //echo mysql_affected_rows()." row inserted into the database effectively."; // CLOSE CONNECTION ---> mysql_close($connection); ?> <?php ?> </body> </html>
-
thanks a lot i will test it now and let you know the results
-
is it possible to transfer variables from 1 file to another? for example is you go to http://www.ve-creative.com/test/8/templateEdit.php at the bottom where it says upload new image and click the form will appear and you can upload....from then it will submit to a php file, i have set it so that it prints the location of the uploaded files so i know its working. After uploading the images i want to redirect it back to the original page. In the original page. I have created a variable with the full location of where the images are uploaded to but need to know how i can get that variable from 1 file to the other without the use of mysql....is this possible? thank you in advance
-
yes i tested to see how it was operating..... no matter how i lay it out with the submission code on the same page it would create a new folder on reload. So i have had to keep it seperate now im trying to work out a way to route back to the page after submission with the generated number in a variable that i could use after its been made
-
Hi, i have this code for uploading files onto a server and it works great but im stumped on just 1 thing....baring in mind im a newbie at php lol. I generate a random number at the start of the code (when the page loads), i have a php form lower down the page that submits to another code with the same page and uploads the images. The problem is the number that is generated when the page loads is never used because when you upload the images it generates another number and creates a new folder. Is there a different way i can do this so just 1 number is generated? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <? $random_digit=rand(0000000000,9999999999); ?> <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" /> <meta name="author" content="ve-creative.com - future-resourcings.com" /> <meta name="description" content="Site Description Here" /> <meta name="keywords" content="keywords, here" /> <meta name="robots" content="index, follow, noarchive" /> <meta name="googlebot" content="noarchive" /> <link rel="stylesheet" type="text/css" href="css/layout.css" media="screen, projection, tv " /> <link rel="stylesheet" type="text/css" href="css/html.css" media="screen, projection, tv " /> </head> <body> <!-- #content: holds all except site footer - causes footer to stick to bottom --> <div id="content"> <!-- #header: holds the logo and top links --> <div id="header" class="width"> <img src="images/logo.gif" alt="Your logo goes here"/> <ul> <li><a href="">Home</a></li> <li><a href="http://www.theauctionwinners.com/main" target="_blank">The Auction Winners</a></li> <li><a href="">Contact Us</a></li> <li><a href="" class="last">Logout</a></li> </ul> </div> <!-- #header end --> <!-- #headerImg: holds the main header image or flash --> <div id="headerImg" class="width"></div> <script src="js/js.js" language="javascript"></script> <script type="text/javascript" src="tinymce/tiny_mce.js"></script> <script language="javascript" type="text/javascript"> /*tinyMCE.init({ mode : "textareas", theme : "advanced" });*/ </script> <!-- #menu: the main large box site menu --> <div id="menu" class="width"> <ul> <li> <a href="business01.html" target="_self" onfocus="blur()"> <span class="title ">Business Research</span> <span class="desc">Effective Business System</span> </a> </li> <li> <a href="testimonies.html" target="_self" class="forum" onfocus="blur()"> <span class="title ">Testimonies</span> <span class="desc style3">View the included layout</span> </a> </li> <li> <a href="templates.html" target="_self" onfocus="blur()"> <span class="title ">Template Optimizer</span> <span class="desc">Create Your eBay Template</span> </a> </li> <li> <a href="downloads.html" target="_self" onfocus="blur()"> <span class="title ">Downloads</span> <span class="desc">Free Useable Software</span> </a> </li> </ul> </div> <!-- #menu end --> <!-- #page: holds the page content --> <div id="page"> <!-- #columns: holds the columns of the page --> <div id="columns" class="widthPad"> <!-- Single column --> <div class="floatLeft width100"> <form id="form1" name="form1" enctype="multipart/form-data" method="post" action=""> <table width="700" border="0" align="center" cellpadding="2" cellspacing="2"> <tr> <td width="177">Template</td> <td><select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)"> <option>item1</option> </select></td> </tr> <tr> <td>Title</td> <td><input name='title' type='text' value='' title='' size="75" maxlength="60" /></td> </tr> <tr> <td>Subtitle</td> <td><input name='subtitle' type='text' title='' value='' size="75" /></td> </tr> <tr> <td>Description</td> <script type="text/javascript"> tinyMCE.init({ mode : "exact" ,elements : "id_description" ,theme : "advanced" ,theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,formatselect,fontselect,fontsizeselect" ,theme_advanced_buttons2 : "cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,|,image,charmap,emotions,iespell,media,advhr,|,ltr,rtl,|,code,fullscreen" ,theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup," ,theme_advanced_buttons4 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,|,forecolor,backcolor" ,theme_advanced_toolbar_location : "top" ,theme_advanced_toolbar_align : "left" ,theme_advanced_statusbar_location : "bottom" ,theme_advanced_resizing : true ,theme_advanced_resize_horizontal : false ,plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups" }); </script> <td><textarea name="description" cols="75" id="id_description" style="width:450px; height:350px;" title=""></textarea></td> </tr> <tr> <td>General Information</td> <script type="text/javascript"> tinyMCE.init({ mode : "exact" ,elements : "id_general" ,theme : "advanced" ,theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,formatselect,fontselect,fontsizeselect" ,theme_advanced_buttons2 : "cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,|,image,charmap,emotions,iespell,media,advhr,|,ltr,rtl,|,code,fullscreen" ,theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup," ,theme_advanced_buttons4 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,|,forecolor,backcolor" ,theme_advanced_toolbar_location : "top" ,theme_advanced_toolbar_align : "left" ,theme_advanced_statusbar_location : "bottom" ,theme_advanced_resizing : true ,theme_advanced_resize_horizontal : false ,plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups" }); </script> <td><textarea style="width:450px; height:350px;" id="id_general" name="general" title=""></textarea></td> </tr> <tr> <td>Terms & Conditions</td> <script type="text/javascript"> tinyMCE.init({ mode : "exact" ,elements : "id_terms" ,theme : "advanced" ,theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,formatselect,fontselect,fontsizeselect" ,theme_advanced_buttons2 : "cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,|,image,charmap,emotions,iespell,media,advhr,|,ltr,rtl,|,code,fullscreen" ,theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup," ,theme_advanced_buttons4 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,|,forecolor,backcolor" ,theme_advanced_toolbar_location : "top" ,theme_advanced_toolbar_align : "left" ,theme_advanced_statusbar_location : "bottom" ,theme_advanced_resizing : true ,theme_advanced_resize_horizontal : false ,plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups" }); </script> <td><textarea style="width:450px; height:350px;" id="id_terms" name="terms" title=""></textarea></td> </tr> <tr> <td>About Us</td> <script type="text/javascript"> tinyMCE.init({ mode : "exact" ,elements : "id_about" ,theme : "advanced" ,theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,undo,redo,formatselect,fontselect,fontsizeselect" ,theme_advanced_buttons2 : "cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,|,image,charmap,emotions,iespell,media,advhr,|,ltr,rtl,|,code,fullscreen" ,theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup," ,theme_advanced_buttons4 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,|,forecolor,backcolor" ,theme_advanced_toolbar_location : "top" ,theme_advanced_toolbar_align : "left" ,theme_advanced_statusbar_location : "bottom" ,theme_advanced_resizing : true ,theme_advanced_resize_horizontal : false ,plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups" }); </script> <td><textarea style="width:450px; height:350px;" id="id_about" name="about" title=""></textarea></td> </tr> <tr> <td>Payment Methods</td> <td>PayPal <label> <input type="checkbox" name="checkbox" id="checkbox" /> <br /> Personal Cheques <br /> <input type="checkbox" name="checkbox2" id="checkbox2" /> </label></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td colspan="2"><div align="center"><strong>NOTE:</strong> Please save your listing NOW before you upload your pictures</div> <!--mult.pictures--> <script type="text/javascript" src="js/jquery-1.2.6.js"></script> <script> <!-- $(document).ready(function(){ $("#generate").click(function(){ //xxxxxxxxx //$("#quote").show("slow"); //$("#quote p").load("resizePic.php"); //grayOut(true, {'zindex':'0', 'bgcolor':'#000000', 'opacity':'90'}); }); }); function editImage(id) { //window.open('resizePic.php?id='+id,'res','width=800, height=700, scrollbars=1'); $("#quote").show("slow"); document.getElementById("iframeresize").src='resizePic.php?id='+id; //$("#quote").load("resizePic.php?"+id); //grayOut(true, {'zindex':'50', 'bgcolor':'#000000', 'opacity':'90'}); } function cancelEdit() { document.getElementById("iframeresize").src=''; $("#quote").hide("slow"); } --> </script> <style> #quote { display:none; width:650px; height:1100px; border:2px solid #000000; background-color:#ebebeb; z-index:1000; } #quotewrapper { } </style> <div id="quotewrapper"> <div id="quote"> <div> <iframe src="" frameborder="0" width="100%" height="100%" id="iframeresize"></iframe> </div> <div style="margin:10px; text-align:center;"><a href="javascript:cancelEdit();">[Cancel Image editing]</a></div> </div> </div> <table width="100%" border="0" cellpadding="5"> </table> <a href="javascript:showhide('div_uploadnewimages');">[upload new images]</a> <div id="div_uploadnewimages" style="border:1px solid #999999; margin-bottom:10px; padding:5px; displaynone;"> <strong>Upload new images</strong><br /> <? $max_no_img=10; // Maximum number of images value to be set here echo "<form method=post action= enctype='multipart/form-data'>"; echo "<table border='0' width='400' cellspacing='0' cellpadding='0' align=center>"; for($i=1; $i<=$max_no_img; $i++){ echo "<tr><td>Images $i</td><td> <input type=file name='images[]' class='bginput'></td></tr>"; } echo "<tr><td colspan=2 align=center><input type=submit value='Add Image'></td></tr>"; echo "</form> </table>"; ?> </div> <div style="text-align:left; margin-bottom:30px;"> <strong><u>Pictures</u></strong> <br /> <div> </div> </div> <!--end:mult.pictures--></td> </tr> <tr> <td> </td> <td> </td> </tr> </table> </form> <h1 align="center"> </h1> </div> <!-- Single column end --> </div> <!-- #columns end --> </div> <!-- #page end --> </div> <!-- #content end --> <? $folderIn=mkdir("upload/$random_digit", 0777); while(list($key,$value) = each($_FILES['images']['name'])) { if(!empty($value)) { $filename = $value; $filename=str_replace(" ","_",$filename);// Add _ inplace of blank space in file name, you can remove this line $add = "upload/$random_digit/$filename"; //echo $_FILES['images']['type'][$key]; // echo "<br>"; copy($_FILES['images']['tmp_name'][$key], $add); chmod("$add",0777); $full_path="http://ve-creative.com/test/4/$random_digit/$filename<br />"; print $full_path; $folderPath="http://ve-creative.com/test/4/$random_digit"; } } ?> <? $username="vecre0_tempU"; $password="auction"; $database="vecre0_templates"; // OPEN CONNECTION ---> $connection=mysql_connect("localhost","$username", "$password") or die("Unable to connect!"); mysql_select_db("$database") or die("Unable to select database!"); // EXECUTE QUERY ---> $query="INSERT INTO paths ( folderPath) VALUES( '".$folderPath."')"; //////-----> $result=mysql_query($query) or die("Error in query:".mysql_error()); //if ($result) //echo mysql_affected_rows()." row inserted into the database effectively."; // CLOSE CONNECTION ---> mysql_close($connection); ?> <!-- #footer: holds the site footer (logo and links) --> <div id="footer"> <!-- #bg: applies the site width and footer background --> <div id="bg" class="width"> <img src="images/logo.gif" alt="Your logo goes here"/> <ul> <li><a href="">Home</a></li> <li><a href="http://www.theauctionwinners.com/main" target="_blank">The Auction Winners</a></li> <li><a href="">Contact Us</a></li> </ul> </div> <!-- #bg end --> </div> <!-- #footer end --> </body> </html>
-
no i don't want to create anything as complicated as that yet. I just want to create a php form where a user selects either options 1, 2, 3 or 4 and when they click continue the php will retrieve the either row with the corresponding ID. I've not done php & mysql for a loooong time and went more into graphic design and ive forgotten a lot of things lol so now im back to being a php swl newbie......the joy. thanks in advance for anyone that recaps me on this lol
-
I have a php form with that has four radio buttons. Depending on which radio button is submitted i want php to get information from my db. the ID of the buttons are 1,2,3 and 4.....they correspond to row 1,2,3 and 4 of my db how do i retieve rows 1 if button 1 is selected? Ive been through a lot of websites to find out but they dont explain retrieving a specific row
-
sorry....here is my form code....can someone tell me where im going wrong? Thank you in advance and here is my php code
-
hi i have gone on php.net to learn how to upload files.....i have done this and it works. But my main aim is to save the location of the file to a db so i can recall it later but right now it is only inputting the words ufile and path instead of the file path
-
hey haku, thanks for replying I am going to research into what you said and test it as best as i can (i am still a newbie to php) so once i use fopen, fclose or fwrite i should be able to get flash to call on the variables to display the last 10 images posted to the DB? (the location of the images will be posted instead of the whole image....it should run quicker that way)
-
can php call the last 10 entries from a sql database and once done can it then create a xml file dynamically? i made this php code in a tutorial to dynamically create a xml file....is it of any use to my question?
-
help??? anybody??? lol
-
okkkk so i have gon over varios flash and xml tutorials racked my brains out....and i ended up with a malibu and coke and the code below lol.......from the coding it brings in a xml file that is created from php..... i just don't understand at all how i can get my upload php to upload the file store the location in my DB and create a xml file that calls the location of the 5 images that are uploaded at the time and not all images within the upload folder.....everything i have tried has failed this is my flash code below and i dont know where to start with getting php to do as you stated.
-
hi....ive gone through the php page and a tutorial worked out a coding to upload a file and it works but from this code how do i get the path to save to my DB i thought that $ufile=$path would surfice but all it did was put a blank entry in the DB, i done something right but something wrong
-
okkk i see....so if i create the php with all my variables that basically access the location of the images that are sent to the DB i should be able to request it in flash..... so for example if i query the DB for the location http://www.yourdomain.com/resources/private/upload/image010101.jpg i can link the returned variable to the $_GET? sorry if im being a pain....i understand what you said but im just trying to figure out in my head how i get this part "?var1=value1&var2=value2""
-
ooohhhh 1 last question..... in flash the URLrequest or URLLoader are they editable to the extent of getting them to request or load the latest 4 images.....ive never had the pleasure of using them so im not too familiar with it