Jump to content

deezy

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

deezy's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello! I have a php / mysql problem that I am struggling to find the best method for. The basic structure of my two tables is as follows: Selection id | Name | selections --------------------------- 1 | User1 | 12,16,22,34 2 | User2 | 2,17,66,69 Products id | Product | ------------- 4 | Prod1 | 5 | Prod2 | My page consists of a dropdown field (containing 'Name'), when a name is selected i need to use the php explode function to loop through the 'selections' and return the product names that the selected user has ordered. Is there a way to achieve this without adding any more tables as i really just need a quick fix. Thanks!
  2. Hi all, Got a problem which spurred from a topic in the PHP discussion but thought it would be best to post it here. I have a Js function to check which checkboxes are checked. My checkboxes are all named ch[] Ive tried re-naming the values in this function but cant seem to get it working, what am i missing? function confirmDelete() { var total="" for(var i=0; i < document.f1.ch.length; i++){ if(document.f1.ch[i].checked) total +=document.f1.ch[i].value + "\n" } if(total=="") { alert("No tables selected to clear"); return false ; } if(total!="") { var agree=confirm("Are you sure you want to clear the following tables: \n\n" + total); if (agree) return true ; else return false ; } } thanks!
  3. Thanks for all your replies, this seems to work great. One more thing. I have a Js function using the ch checkboxes which has stopped working, obviously as ive changed the name to ch[]. Ive tried re-naming the values in this function but cant seem to get it working, what am i missing? function confirmDelete() { var total="" for(var i=0; i < document.f1.ch.length; i++){ if(document.f1.ch[i].checked) total +=document.f1.ch[i].value + "\n" } if(total=="") { alert("No tables selected to clear"); return false ; } if(total!="") { var agree=confirm("Are you sure you want to clear the following tables: \n\n" + total); if (agree) return true ; else return false ; } } thanks again!
  4. Hi, I have a php page containing 5 checkboxes all named ch but with different values. The checkboxes values are all table names within my database. I need to be able to loop through each checkbox and if its been selected i need that table to be cleared out. I know how to clear the table its just the looping through the ch checkboxes and the if statement to see if its been selected im unsure about. Thanks very much.
  5. Just bumping this as i have still not been able to find a solution, thanks
  6. Hi. There are values in my database stored like so: +----------+ | num | +----------+ |2,4,8,9,11 | A dropdown on my webpage contains a list of numbers. Is it possible to query the database to return all rows that contain one of the numbers in the 'num' field even though they are separated by commas? Thanks
  7. thanks, that works really well. Is there a way i can get each 'id' and store them as id1,id6,id8,id9 ? thanks again.
  8. Hello I have a repeating table with a checkbox at the end of each row. The checkboxes are dynamically assigned a different name: <input type="checkbox" name="checkbox" id="<? echo $row_details['id']; ?>" value="<? echo $row_details['id']; ?>" Upon submission of the form how can i go through the checkboxes and for each checked item i need to order them like (id1,id3,id7,id9) and store the whole string into my database? thanks for any help
  9. Thanks for your reply. Yes i agree, the dreamweaver coding is not the best by any means, in future projects with more time i hope to manually code everything. I was hoping there would be some method of dynamically creating a hyperlink to a dynamic page containing information for the specific row? thanks
  10. Hello all, I have a slight problem with a repeating table. The table is populated using Dreamweavers 'dynamic table' object and repeated for every row in the database. I have added two more repeating columns, one with a radio button and one with an image. My problem is, i want to use the image as a hyperlink to a popup page displaying data relevant to the selected row only. How am i able to assign a unique link to a page dynamically for each row in the table? thanks.
×
×
  • 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.