Jump to content

Lister471

Members
  • Posts

    18
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Lister471's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. Many thanks seems to work great. Thanks again.
  2. Good evening. Sorry for the poor title but i have no idea really what i should call it. I have a script that simply extracts the results from a table that match the day of the week. So today would be 6 so if any items match 6 then they will be echoed out. However there is a option when adding items to select witch days you wish to item to be included so if you select more than 1 then the value in the table is not 6 it could be 16 or 36 so when i use the WHERE to look for items that match the day it see's 36 or 16 and does not return anything. My question is, is there a way to WHERE for items that include a 6? so even if the result returned is 36 or 1236 it would recognize there is a 6 in the string. I hope the above make sense. I know what i mean in my head, just having a hard time explaining it. Thanks in advance. Paul Aka Lister471
  3. I am getting close well what i class has close lol. However i have 1 problem well 2. Doing it like this adds everything fine exsept the amon field it adds only the last number from the array. However Doing it with the { } back in add everything fine expect the asname field where it add only the last select item from the array. I realize that the coding is prob all wrong but it sort of works
  4. Cheers for the replys. Muddy_Funster i tried what you said but it generates and error. That it canot unset. Has for the array_filter() that looks just like what i need. I will have a read up and hopefully it will make some sense. Thanks to you both.
  5. OK taking the advise above i have made some small headway. However i have a problem i have no idea how to fix. Ok the problem is the array is carrying empty fields. So there is 26 fields and people can fill out anything from 1 of them to 26. If you say fill out 3 of the fields you get a result like. Returned Value 1 Returned Value 2 Returned Value 3 Empty Empty x 21. And then it adds 21 empty fields to the database. My question is how do i make it so it only add fields to the database that has content rather than adding the full 26 rows. Hope it makes sense.
  6. cheers. maybe i am unsure to be honest. If i was doing it with out arrays i would have something like.
  7. Me again i will get the hang of this one day I have a form that has 3 fields battleno, asname, amon. I can send the arrays to the next page and echo them out no problem, but this is individually. What i am unable to do is add the other 2 fields into the code below so the code keeps working. I have tried a few things and well i thought it was time to post. I have a few books but there is nothing in them about this. Also searched the internet but there is little that i understand to be honest and the things i did find dont work. battleno is not an array btw the other 2 are. Hope that makes sense and thanks in advance.
  8. sorry for the delay, had a bust few days. Thank you very much for your help gents. Its very appreciated. Lister471
  9. Thank you Pikachu2000 for your reply. I understand what your saying and i will give it ago once i feel up some time. And if i get it working i will be sure to use it. And thank you mikosiko for the link i will look it over.
  10. Another question. I need to make the code that inserts the data also insert the number for the team. So player 1 and player 2 will show has team 1 player 3 and player 4 has team 2. The changes i have made work but it simply add's the first number 1 and then keeps adding 1 to it. So player 1 is on team 1 player 2 is on team 2 and so. Is there away to make it so it inserts 2 numbers at time, i dont know how to explain it i cannot get it out of my head onto screen so it makes sence. I hope you get what i mean. Here is the code from above with a simple edit.
  11. Brilliant, once again thank you very much for your help. With your help and the help from other here i am just about finished. And most importantly i have learnt much. Thanks again. Lister471
  12. Many thanks, i understand now you have shown me what was meant about including it in the loop. Many thanks for your help. I have tested and it works just fine now with your code so again thanks. I do have 1 more question though. In the form there will be 32 fields has we are hoping for 32 signups, however on testing i noticed that it added a blank entry for the fields left blank. Is there anyway to stop this and only had entry's for fields with data? Thanks again. It was very kind of you to help. Lister471
  13. i have tried many combinations i believe the problem is with the foreach's but like i said i have tried many combinations. Also i have tried Many thanks Lister471
  14. Yes i understand what you mean, with it not been in the loop it only adds the last name has that is the one stored rather than looping though the who list. Many thanks for that. However i have move the } to include the query in the loop but it still only add 1 entry, any ideas?
  15. After looking around the net and getting i feel close i though i would post and ask you all. I am trying to add x number of names to a database each on its own row. I found some code and have edited it and i understand most of what its doing but i cannot get it to work, it just add witch ever name was last. Here is the form code just with 3 test fields. Ok this the script i found in it unedited state, i thought i would be easy to understand if you saw it before i broke it. I tried changing the word Activity to player and the work Act to play and then changing all other referanced. On filling out the fields with name lets say Paul Bill and Jack it echos that it has added x number of rows but when looking in the database it has only added the last in this case Jack. If there is anyone willing to edit the code above so it will work with my single field i would be very great full, also if someone would answer the questions i placed in the script that would be great also. Many thanks. Lister471
×
×
  • 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.