Jump to content

ironside82

Members
  • Posts

    21
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ironside82's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi, I've got an issue with one of my pages: http://www.thelondonfiltercompany.com/filters.php?filterid=34 This appears fine in every browser other than IE8 where, for some reason, it decides to shove the main page content into the side bar and turn it into a link. I've been battling with this for hours, I'd just see if there is anything I am missing here! Thanks James
  2. Hi there, I need to get this working. I have a DIV which changes colour when I hover over it, Simple. However when you mouse over this DIV I need another DIV with a separate style to change also. Is it possible to somehow nest another style within the hover brackets so that the other DIV also changes. I hope that explains it: This is DIV 1 hover: #sidemenu_item:hover, { background-color:#F1F1F1; color:#3399CC; } And This is DIV 2 - #sidemenu_item_home { position:relative; float:left; width:43px; height:45px; background-image:url(images/BUTTON_home_mono.png); } needs to change to: #sidemenu_item_home { position:relative; float:left; width:43px; height:45px; background-image:url(images/BUTTON_home_mono); } When you mouse over DIV 1 Thanks in advance James
  3. I dont need to support multiple formats, Just one that works and is the easiest to implement, If RTF if tricky do you know of any other formats that would work? Thanks
  4. Hi, I've a question on how to display a text document using PHP, I want to be able to display a formatted text document into part of my site using PHP, It doesn't matter what format the document is rtf, doc etc.. The file name of the text document is stored in a database and then recalled using PHP and displayed with all its correct formatting. I've tried using file_get_contents to recall an RFT file but that churns out a load of rubbish. As long as I can recall a file from a database and display it correctly I don't mind how it is done. Thanks in advance for you help James
  5. Excellent, Worked straight away, thanks dreamwest
  6. Hello, This query works fine on my site and returns individual results using DISTINCT: $compare1_sql = "SELECT DISTINCT manufacturer_id FROM filters WHERE cat_id2 = $cat_id2"; However I need to call more than one field from the table, When I add them like below it does not work: $compare1_sql = "SELECT DISTINCT manufacturer_id, sample_image_1, sample_image_2 FROM filters WHERE cat_id2 = $cat_id2"; Can anyone tell me where i'm going wrong with this Many thanks James
  7. I have thought about doing it that way however, The Database is quite complex due to the different variables each product has, there is also a rental quote feature I need to design amongst other things. I don't think trying to base the design I have around a shopping cart package would be easy. There must be some way around it. Its almost easier to imagine if the site was already up and running with items and I wanted to then add a facility to buy the items. I dont have the skills to design something like this, Would it be something I could out source? I hope this makes sense..
  8. Hello, I'm going to be working on a PHP driven site soon which will have a large list of varied products all sorted in an SQL database that I will be designing myself. I've have a request to implement a shopping cart so that you'll be able to buy certain items that are available for sale. I'm having trouble getting my head around linking my database to a 'cart package' for example so that stock levels and prices can be maintained from the one database. Maybe this is not possible, I'm just needing to know before I set about the design. Thanks again for your continuing support Regards
  9. Hello, I've hit a stumbling block with the following code, It is generating a form from details held in a database so the user can update each record in one hit, Normally this would be easy but because I cannot have fixed form names I have included the mysql update command inside the loop as you will see. My thinking behind this is each time it loops the variables will change depending on the latest bit of information pulled from the database therefore the update must be performed on each pass in order to update correctly Is this the way to do it or am I getting it wrong. here is the snippet <? $result2 = mysql_query("SELECT * FROM bags"); while($r2=mysql_fetch_array($result2)) { $bag_id=$r2["id"]; $bag_model=$r2["model_number"]; $bag_name=$r2["bag_name"]; $result3 = mysql_query("SELECT * FROM compat WHERE cam = '$camera_id_1' AND bag = '$bag_id'"); while($r3=mysql_fetch_array($result3)) { $compat_id=$r3["id"]; $compat_check=$r3["ok"]; if ($compat_check == "1") { $check = "selected"; } else { $check = ""; } ?> <tr> <td><? echo $bag_model; ?> <input name="compat_id_2" type="hidden" value="<? echo $compat_id; ?>"/></td> <td><? echo $bag_name; ?><input name="camera_id_1" type="hidden" value="<? echo $camera_id; ?>"/></td> <td> <label> <select name="check" id="check"> <option value="0" <? echo $check; ?>>not compatible</option> <option value="1" <? echo $check; ?>>compatible</option> </select> </label> </td> </tr> <? $checkbox=$_POST["check"]; $compat_id_2=$_POST["compat_id_2"]; mysql_query("UPDATE compat SET ok='$checkbox' WHERE id='$compat_id_2'"); } } ?> Thanks for you help James
  10. I have a simple form which inserts information into a database. For some reason I am getting a double insert. I.e two records created from one press of the submit, I've tried stripping the code right back to see what could be causing it but with no luck, Is there a obvious answer to this? thanks code: <form action="admin_addbag.php" method="post" enctype="multipart/form-data" class="uniForm"> <table width="734" border="0" cellpadding="2" cellspacing="0"> <tr> <td width="96">Model Number</td> <td><label> <input type="text" name="model_number" id="model_number" /> </label></td> <td colspan="2">(Minus last colour letter)</td> </tr> <tr> <td>Bag Name</td> <td colspan="3"><input type="text" name="bag_name" id="bag_name" /></td> </tr> <tr> <td>Weight</td> <td width="194"><input type="text" name="weight" id="weight" /></td> <td colspan="2">(Kg)</td> </tr> <tr> <td>Max Lenses</td> <td colspan="3"><input type="text" name="max_lenses" id="max_lenses" /></td> </tr> <tr> <td>Colour 1</td> <td><input type="text" name="colour1" id="colour1" /></td> <td width="99">Upload Image</td> <td width="329"><label> <input name="new_image1" id="new_image1" size="30" type="file" class="fileUpload" /></label></td> </tr> <tr> <td>Colour 2</td> <td><input type="text" name="colour2" id="colour2" /></td> <td>Upload Image</td> <td><input name="new_image2" id="new_image2" size="30" type="file" class="fileUpload" /></td> </tr> <tr> <td>Colour 3</td> <td><input type="text" name="colour3" id="colour3" /></td> <td>Upload Image</td> <td><input name="new_image3" id="new_image3" size="30" type="file" class="fileUpload" /></td> </tr> <tr> <td>Colour 4</td> <td><input type="text" name="colour4" id="colour4" /></td> <td>Upload Image</td> <td><input name="new_image4" id="new_image4" size="30" type="file" class="fileUpload" /></td> </tr> </table> <br /> <label> <button name="submit" type="submit" class="submitButton">Submit</button> </label> </form> <br /></td> </tr> </table> </tr> </table> <?php // ADD TO DATABASE $model_number=$_POST["model_number"]; $bag_name=$_POST["bag_name"]; $weight=$_POST["weight"]; $max_lenses=$_POST["max_lenses"]; $colour1=$_POST["colour1"]; $colour2=$_POST["colour2"]; $colour3=$_POST["colour3"]; $colour4=$_POST["colour4"]; $new_image1=$_POST["colour1url"]; $new_image2=$_POST["colour2url"]; $new_image3=$_POST["colour3url"]; $new_image4=$_POST["colour4url"]; mysql_query("INSERT INTO bags (id, model_number, bag_name, weight, max_lenses, colour1, colour2, colour3, colour4, colour1url, colour2url, colour3url, colour4url) VALUES ('', '$model_number', '$bag_name', '$weight', '$max_lenses', '$colour1', '$colour2', '$colour3', '$colour4', '$new_image1', '$new_image2', '$new_image3', '$new_image4')"); ?>
  11. Thanks rhodesa.. I'll have a look at that app and see how easy it would be look hook it up to my database
  12. Before I give up, I will check to see if anyone can help. I basically have a simple database setup with a table which contains a list of cameras and another table which contains a list of camera bags. if you visit www.blackberrystudios.co.uk/domke you can see I currently have a bag check running on there which checks to see if a camera will fit inside a camera bag or not. I am trying to make this feature more interactive by adding the ability drag and drop a small image of a camera on to an image of a camera bag which then produces the following tick or cross depending on its compatibility. Is this possible to link a simple java app in with PHP / Sql database which would allow this to work. I'm after a relatively quick solution without delving into flash. Any help is most appreciated. Thanks again James
  13. i am performing a SQL search with the code below which is not working: $model=$r[$bag1]; how do I get the variable $bag1 to function in this statement? Should be simple enough. Am i missing quotations or something? Cheers James
  14. Genius, That worked a charm Thanks a lot James
  15. I am trying to include html and php in a variable. here is an example of code: $msg = '<p><? echo $friend_firstname; ?> <? echo $friend_lastname; ?> (<? echo $friend_username; ?>) wants to add you as a friend. <a href="viewprofile.php?profile_id=<? echo $friend_id; ?>">View their profile</a></p><p><a href="req_friend.php?friendid=<? echo $user_id ?>">Add them as a friend</a></p>'; this information that the variable provides is then inserted into a database. when recalled from the database it should output: Joe Bloggs (joeb33) wants to add you as a friend View their profile //-> links to viewprofile.php?profile_id=8 Add as a friend //-> links to req_friend.php?friend_id=6 how ever it appers that the PHP elements that are encapsulated in the ' ' are not making their way thorough when their are later output again from the database. Is this an issue with the way the information in that variable to inserted in the database or when it is later echoed to a users inbox? It a little complicated to explain. Thanks again James
×
×
  • 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.