Jump to content

deansatch

Members
  • Posts

    300
  • Joined

  • Last visited

Everything posted by deansatch

  1. Not sure exactly what parts you want in your loop but this is my guess. <?php // let's get some data $name = $_POST["something"]; include('adminconnect.php'); $query = "SELECT ProductNo,ProductName,Stockamount,Display,Description,Price FROM Product WHERE ProductNo='$name' "; $result = mysql_query($query) or die (mysql_error()); while ($row = mysql_fetch_array($result)){ // loop through and display ?> <div id="containerBg4"> <div class="padTop15"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="padTop1"> <!-- data Left start --> <div class="editLeft"> <!-- picture1 start --> <div class="editLeftBox">picture1:</div> <div class="clr"> <!-- --> </div> <div class="padTop5"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="editLeftBox"><img src="../../images/pic1.gif" alt="pic1" width="245" height="245" /></div> <div class="clr"> <!-- --> </div> <div class="padTop5"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="editLeftBox"> <input type="file" name="uploadfile" class="newsUpFile"> </div> <div class="clr"> <!-- --> </div> <!-- picture1 finish --> <div class="padTop50"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- picture2 start --> <div class="editLeftBox">picture2:</div> <div class="clr"> <!-- --> </div> <div class="padTop5"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="editLeftBox"><img src="../../images/pic2.gif" alt="pic2" width="245" height="245" /></div> <div class="clr"> <!-- --> </div> <div class="padTop5"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div class="editLeftBox"> <input type="file" name="uploadfile" class="newsUpFile"> </div> <div class="clr"> <!-- --> </div> <!-- picture2 finish --> </div> <!-- data Left finish --> <!-- data Right start --> <div class="editRight"> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Product No:</div> <div class="editRightForm"> <input type="text" class="itemEditForm02" name="something" value="<?php echo $row['ProductNo'];?>" /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Product Name:</div> <div class="editRightForm"> <input name="0" type="text" class="itemEditForm02" v<?php echo $row['ProductName'];?> /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Description:</div> <div class="editRightForm"> <textarea type="text" class="itemEditForm03" name="0" value="<?php echo $row['Description'];?>" /> </textarea> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Remarks:</div> <div class="editRightForm"> <input type="text" class="itemEditForm02" name="0" value="" /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Price:</div> <div class="editRightForm"> <div class="editItemPrice1">$</div> <div class="editItemPrice2"> <input type="text" class="itemEditForm04" name="0" value="<?php echo $row['Price'];?>" /> </div> <div class="clr"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Sale:</div> <div class="editRightForm"> <div class="editRadioLink1"> <input name="link" type="radio" value="yes" /> </div> <div class="editRadioLink2">Yes</div> <div class="editRadioLink3"> <input name="link" type="radio" value="no" checked="checked" /> </div> <div class="editRadioLink4">No - sale price: $ </div> <div class="editRadioLink5"> <input type="text" class="newsEditForm02" name="0" value="380" /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> <div class="editRightBox"> <div class="editRightText">Display:</div> <div class="editRightForm"> <div class="editRadio1"> <input name="display" type="radio" value="yes" checked="checked" /> </div> <div class="editRadio2">show</div> <div class="editRadio3"> <input name="display" type="radio" value="no" /> </div> <div class="editRadio4">hide</div> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop75"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <!-- data Right finish --> </div> <div class="clr"> <!-- --> </div> <div class="padTop11"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div id="dottedIn"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <!-- btn start --> <div class="clr"> <!-- --> </div> <div class="padTop16"> <!-- --> </div> <div class="clr"> <!-- --> </div> <div id="btn"> <div id="btnL"><img src="../images/btn_update.gif" width="73" height="23" /></div> <div id="btnSpace"> <!-- --> </div> <div id="btnR"><img src="../images/btn_clear.gif" width="73" height="23" /></div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <div class="padTop16"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- btn finish --> </div> <div class="clr"> <!-- --> </div> <?php } ?> <!-- data content finish --> <!-- data btm start --> <div id="containerBg3"> <div class="padTop1"> <!-- --> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data btm finish --> </form>
  2. Your html seems a bit overly complicated as well so it is hard to imagine how it is supposed to be. You have a lot of pointless divs and empty comments. Maybe you could cut down the unused html and still get the same result.
  3. You haven't actually got anything in your loop. You need to put your echo $row['ProductNo'] inside your loop i.e. before the closing }
  4. Try this: $query = "SELECT ProductNo,ProductName,Stockamount,Display,Price FROM Product WHERE ProductNo='$name' "; I'm away out on the drink now so I'll have to leave this in someone elses hands I'm afraid.
  5. unexpected $end means you have missed off the closing } for your while loop Line 593 is probably the very last line on your file
  6. like I said earlier, Remove that ProductNo from your value in your radio button.
  7. $query = "SELECT ProductNo,ProductName,Stockamount,Display,Price FROM Product WHERE ProductNo = $name ";
  8. You don't really need to break out when using double quotes echo "<html>\n<body>\n$msg_title\n\n$msg_text</body>\n</html>";
  9. You'll probably want to change this: <td><input type="radio" value="ProductNo<?php echo $row['ProductNo']; ?>" name="something" /></td> to this: <td><input type="radio" value="<?php echo $row['ProductNo']; ?>" name="something" /></td>
  10. You have to use php tags. <form> <?php $name = $_POST["something"]; ?> <div class="editRightBox"> <div class="editRightText">Product No:</div> <div class="editRightForm"> <input type="text" class="itemEditForm02" name="0" value="<?php echo $name ?>" /> </div> <div class="clr"> <!-- --> </div> </div> <div class="clr"> <!-- --> </div> <!-- data finish --> <div class="padTop3"> <!-- --> </div> <div class="clr"> <!-- --> </div> <!-- dat start --> </form>
  11. This: <tr><td> </td><td colspan="5"><hr /></td><td></tr> To: <tr><td colspan="6"><hr /></td><td></tr>
  12. Try that: echo'<form style="border:1px solid #ccc;padding:3px;text-align:center;" action="xxxxxx" method="post" target="popupwindow" onsubmit="window.open(\'xxxxxxxx\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');return true">'. '<p>Enter your email address:</p>'. '<p><input type="text" style="width:140px" name="email"/></p>'. '<input type="hidden" value="xxxx://feeds.feedburner.com/~e?ffid=1697582" name="url"/>'. '<input type="hidden" value="Girls Know What They Want.com--"Where Our Customers Come First!"" name="title"/>'. '<input type="hidden" name="loc" value="en_US"/>'. '<input type="submit" value="Subscribe" />'. '<p>Delivered by <a href="xxxxxx" target="_blank">FeedBurner</a></p>'. '</form>';
  13. It is a strange way to give your table a border, but I suppose a quick fix would be to change this: <table width="850" border="0" cellspacing="0" cellpadding="0"> To: <table width="800" align="center" border="0" cellspacing="0" cellpadding="0">
  14. Just out of curiosity, would move_uploaded_file() not be a better function for what you are trying to do?
  15. Not sure I understand you correctly but do you realise you have value set twice in your input field? value='$id'&img='img' value ='$img'
  16. Did you replace it like so? copy ($_FILES['file']['tmp_name'], "galleries/folder1/".$_FILES['file']['name']) or die("Could not copy file");
  17. can we see the css for div with id=containerBg4 as well? Is that a background image? This post has drifted well away from php. More html or css now.
  18. You'll have to post a bigger section of your code so we can see what is containing the table.
  19. your username is "$_SESSION["UserName']"; But make sure you put a "logged in check" at the start of each page as well.
  20. <!-- data start --> <form method="post" action="edit.php"> <table width="850" border="0" cellspacing="0" cellpadding="0"> <tr align="left"> <td>SELECT</td> <td><a href="#">serial no.</a></td> <td><a href="#">product name</a></td> <td>display order</td> <td><a href="#">display</a></td> <td><a href="#">pricet</a></td> </tr> <?php // let's get some data include('adminconnect.php'); $query = "SELECT ProductNo,ProductName,Display,Price FROM Product WHERE Producttype = 'Game' "; $result = mysql_query($query) or die (mysql_error()); while ($row = mysql_fetch_array($result)){ // loop through and display ?> <tr align="left"> <td><input type="radio" value="ProductNo<?php echo $row['ProductNo']; ?>" name="something" /></td> <td><a class="black"><?php echo $row['ProductNo'];?></a></td> <td><?php echo $row['ProductName'];?></td> <td>Display order results</td> <td><?php echo $row['Display'] ;?></td> <td><?php echo $row['Price'];?></td> </tr> <tr><td> </td><td colspan="5"><hr /></td><td> </td></tr> <?php } ?> <tr><td><input type="submit" name="submit" value="Edit" /></td></tr> </table>
  21. You have to understand what colspan means. Basically it is the number of columns you want the td to take up. Currently it should be set as 5 not 4. You can replace with SELECT. in between the td tags before PRODUCT NO
  22. what happens if you replace $A_path with folder1/ ?
  23. You will have to include session_start() and your "is user logged in?" verification code on every page that is just for registered users, otherwise anyone can view them. As long as you don't kill the session, they should be able to navigate away to other non-registered pages of your site and come back and still be logged in.
×
×
  • 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.