Jump to content

11Tami

Members
  • Posts

    329
  • Joined

  • Last visited

    Never

Everything posted by 11Tami

  1. Perfect! Thats better than expected and all I need. I bet a lot of people don't know about that. I think I sent you some links I had before. Thanks again everybody.
  2. I'm afraid you lost me, I even read it at mysql and didn't understand it there either. So If I have 5 characters in "varchar" like this: 12 as d what will happen compared to those same exact characters in "char"?
  3. Thanks a lot. OK I'll try varchar then. I am guessing varchar means various charactors, which means its ok if I use it for text.
  4. Yes I already did it on the form itself for max characters but when people are using pad files it overrides it. Thanks for the link but it doesn't talk about which options will take the length value. The only place to fix it is the database. Just wondering why it doesn't work on text fields and if varchar length values is the only or best way. Hope someone knows.
  5. I didn't ask this in mysql because I might have a php question related to it. Can anyone tell me if varchar is the only one that the length value works on? Thanks.
  6. Hello, why does the length attribute, to set the character length of what is added to a a mysql field, only seem to work on varchar and not text? Please let me know, thanks very much.
  7. We can only make clear what we understand. There is no way for us to be exactly clear if we don't know every function there is to know about php. Which a lot of us don't.
  8. I just think really good coders forget why we are here in the first place. Because we don't know what we are doing. We aren't perfect, if we were we wouldn't be here. We are learning. Just because I had no idea I would need cookies because of lack of experience, I still stated what I was looking for.
  9. Thank you very much! Thats mostly what I need, I just need to adjust just a few things but you did it, I appreciate it very, very, much. I can't keep defending myself, from the start I said this is what I needed except but a few things. But like I said I really appreciate the help from everyone and I already sent you all I had, have nothing else. Thanks again for all the help.
  10. Ohmgosh, I can't believe it, this is doing something. <?php $max_files = 15; $current_file = 0; if ($current_file = 0) {setcookie("thiscookie", $current_file, time()+60*60*24*30); /* expire in 30 days*/} if (isset($_COOKIE['thiscookie']) { setcookie("thiscookie", $current_file++, time()+60*60*24*30);} if ($current_file == $max_files) $current_file; $include_file = "file" . $current_file . ".txt"; include ($include_file);} ?> Its going from file0.txt to file1.txt! Is there a way I can keep it going with out adding another line like this? if (isset($_COOKIE['thiscookie']) { setcookie("thiscookie", $current_file++, time()+60*60*24*30);} I don't know why I would need to add any other lines anyway. It says if the cookie is the same to go on to the next text file already. Hoping you guys can tell me why it storing the first one to the second but not going on from there. Once I figure that out, I should be good to go.
  11. OK thanks very much, I'm game I'll try anything. Also, If anyone knows how mjdamato's could help with this. I just switched a few things around because I think I need to set the cookie first and I didn't understand a few other things when it wasn't working on page reload. As usual with this I don't know how to make it go to the next item on the next page load when the cookie visits again. I also don't know how to set his time() function. In the meanwhile, I'll get started on the database code. <?php $max_files = 15; $current_file = 0; if ($current_file = 0) {setcookie("thiscookie", $current_file, time()+60*60*24*30); /* expire in 30 days*/} if (isset($_COOKIE['thiscookie']) { setcookie("thiscookie", $current_file++, time()+60*60*24*30);} if ($max_files = 15) $current_file; $include_file = "file" . $current_file . ".txt"; include ($include_file);} ?>
  12. Thank you all very much for all your help, yes I was reading, I was thinking in javascript. That it would just go onto the next item with the right code. Didn't know I needed sessions for php for it to be able to continue. After Thorpes last post making me understand how it works with php the lightbulb finally came on and it makes sense to me now. I tried Thorpes but am getting this. Parse error: parse error, unexpected T_BOOLEAN_OR, expecting ',' or ')' on line 4.
  13. I am. I just don't know how to keep this going. This equals 1. I need it to go to 2 then 3 all on its own on page load. Is there some sort of repeat function or something to keep it all going? Can't find it. <?php $i = 0; $i++; if ($i == 10) $i; $getfile = $i++; $includefile = "file" . $getfile . ".txt"; include ($includefile); ?>
  14. I did, I posted it twice, on my first question and after that but I don't know where to go from there. Here is the last one again, but I know its incorrect, I just don't know how to fix it. Its supposed to go from one .txt file to the next in order. when it reaches 10 or whatever number is inserted, to start over again.
  15. Forgot to say when that same person comes back to the page again the same rotation starts over. Nothing needs to be remembered.
  16. I say lets forget about the code and just have a ho down ha ha, you people have great concepts. Thanks for the help. Ok..... back to the code. Yes Thorpe I saw that, thank you, it just seemed over my head but I'd like to ask you about it later. You guys are taking this to a whole new level I hadn't even thought of before. But I'll try to keep it simple and explain further. It doesn't matter to me if each person sees a different item. A person is looking at the page and they see one item in the rotation. Then the page refreshes and the same person sees item number 2, refreshes again they item number 3. Thats all I need. I was trying to show that in the terrible last code I posted but I don't think anyone could tell what I was attempting. Hope that helps.
  17. I don't think a sleep will work unless someone can proove to me otherwise, because it can't replace the item that was already put on the page before. Page load or refresh is fine to go to the next item. I think whats causing it to put more than one on the page is this $i<32;$i++ I think if it said something like $i++ without the < then it might work. I'm just not savy enough at this to know right where to put it all. $i = 1; $i++; if ($i == 55) {$i} $getfile = $i; $includefile = "file" . $getfile . ".txt"; include ($includefile); I know I have this wrong I just don't know how to do the i++ Something that says to automatically go to the next file number on next page refresh. Then if the file number reaches 55 for it to loop back to number 1 again. Hope someone can fix my errors. Thanks.
  18. This is the strangest thing, I've looked at your code inside and out. I think I can do it without the 0 in front. But for the life of me I can't figure out why its putting all of them on the page, instead of just one at a time on page load. Anyone know?
  19. Thanks, isn't that random? I still need sequential.
  20. I just realized, sleep won't work. It will still show all of them on the page. Because I don't think it can replace the first item with the next one, since the first one has already executed. We're close but not quite. I need something that will show the new item when the page loads, instead of all at once. Thank you very much.
  21. Thanks a lot, I'll send you guys something. Only problem I'm having is its showing all of them and all at once and posting two of the same in a row. Any way to put a delay in before the next one appears? I would imagine sleep would help with that but not sure what to attach it to. Thank you very much.
  22. Hello, I know how to change things randomly with php <?php $this = rand(1,31); $includefile = "file" . $this . ".txt"; include ($includefile); ?> Which would change a text file between 1 and 31 randomly. But how to do it so first it goes to file01.txt then to file02.txt ,3, 4, and so on and in order? Do I need an i++ in there somewhere, if so how? Thank you very much.
  23. Good deal glad its solved, just out of curiosity what was your other method using. Maybe I can use it, sometimes ajax drives me nuts. Thanks.
  24. Thats a great idea! Thanks very much for the sort tip at least it will solve this big problem. I looked for a sort before and couldn't find it which I thought was very odd that mysql wouldn't have sort when most other databases do. That should be all I need. I finally found the sort at mysql and it said I had to use an Order by clause. Which sounds like I'll need to view the sorted rows outside of phpmyadmin. I use phpmyadmin the most when I'm viewing and deleting the rows. Does anyone know of a way that sort can be done right at phpmyadmin instead of setting up a separate html page for the order by? Thanks.
  25. Isn't it nice to go from a very sad face to a little hope again??!!? Glad I could help. Bad news is now your up with me. It took me a long time to get the code where it is and I don't know enough about http requests to be able to help you with the rest unfortunately. I'm afraid you'll have to find others that know more about requests. Maybe someone else will see this and help you here. Best wishes, you'll probably eventually get what you need.
×
×
  • 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.