Jump to content

Kane250

Members
  • Posts

    230
  • Joined

  • Last visited

Everything posted by Kane250

  1. Thanks. So is this code just reordering the table each time to find the oldest or the newest? In actuality this table would contain many entries (possibly hundreds), so I'm wanting it to start at the oldest entry and then progressively climb towards the newest entry with each new click. Would I use this same code but not limit the results?
  2. The simple solution I was looking for was some pre written PHP that I could maybe modify and add in the extra elements I need for customization. It's not like this is a paid job or anything, just something we would like to finish within the next 2 months or so. Drupal for me, is not the simple solution, it has a steep learning curve. I tried using it and don't get it still. Would rather just use PHP. I know that some frameworks are out there that are written in PHP and can be modified within the code for what you need, and I figured since this was a pretty standard setup, there might be something that someone could point me in the direction of to get me started....that's all.
  3. Hi there, This may be simple, and I might just be having a block, but hopefully someone can put perspective on this for me. I have a table like this: id | text | created_at | updated_at 1 text1 timestamp timestamp (1 day ago) 2 text2 timestamp timestamp (2 days ago) In the table are a number of entries that are just text, and the created_at and updated_at are automatically stamped with DATETIME. I'm trying to create a link on a page that upon clicking will find the entry that was updated least. I'm basically doing this for that: $order_by_desc = "SELECT text FROM para1 ORDER BY `updated_at` DESC LIMIT 0 , 1"; $oldest_result = mysql_query($order_by_desc,$con); $oldest_row = mysql_fetch_array($oldest_result); $least_updated = ($oldest_row['text']); I am using a link that basically just prints out $least_updated. In this example it would print out the bottom result, or ID# 2. However, what I want this button to do is move up the table the next time it is hit, so that after it has displayed what would be ID#2, it looks for the next oldest entry that has been updated. In this case ID#1, but this would not always be the case since entries in the table will be updated sporadically. Is there any way to set this up so that a link or a button of some sort will keep displaying this information each time? I feel like it's got to be simple, but I just don't do enough php to know what function might do this. I realize this might require something like javascript or ajax...so if anyone could just help me out with the php code that I need ajax to update the link with, that would be really helpful. Thanks for any help in advance!
  4. anyone seen ratemyprofessor.com before? I'm basically building a smaller version of that and need to do it quickly, so I'd prefer to not write all the code myself. Basically I'm looking for something that does not require registration and allows people to add teachers to an alphabetized list and rate them with stars, and leave anonymous comments. Building this for my school, but they want it faster than I can write the php for it. Suggestions? I've never used drupal or other cms systems, so anything thats simple would be great! thanks!
  5. Figured it out. Apparently when someone looks up a website's registration information there is contact info listed. It just so happens the email address people see is not my personal one, but a weird @proxy whatever email. So it turns out that someone just found this and sent me the email only. It really looked like an email one would receive from a php script without custom headers though... That's why i freaked...oh well, lesson learned!
  6. I'm asking because even though it was addressed to that email address, I received the email in my gmail account. I assumed it was database related because my gmail address is listed inside the database I built for this website....clearer? I don't receive email at thataddress@proxy.dreamhost.com even though that was who it was addressed to.
  7. I manage a website of a campaign and this morning somehow, somebody was able to send me email that was addressed to websiteurl@proxy.dreamhost.com but was from their own personal email address. I fear that they somehow accessed everyone on my email database list and that this e-mail was sent to them as well, but I cannot be sure. Has anyone else experienced a problem like this before? Any extra security measures I can take so nobody could gain access to my database? (if that is in fact what happened here). Thanks.
  8. So the text that appears on the submit button has to be different? There's no way of doing it all behind the scenes?
  9. I have two seperate forms on one page that submit data to MySQL. However, if the user hits the return key when trying to submit the second form, it activates the submit button for the first form. Is there any way to tell the browser to not do this?
  10. ok let me be more specific. The youtube video is on a div that has scrolling turned on and the video is towards the bottom of the page. However, when the page first loads, the youtube video shows up as the top most layer, menaing it is showing up over the top layer div and down where nothing should be seen scrolling. It actually scrolls down past the end of the container and flickers above and below the top div while doing so... anyone? It happens much more when I am using Opera instead of other browsers..
  11. I am adding a YouTube embed code to a site I built and when I scroll the div, the video flickers through the div above it. Anyone know what might be contributing to this??? Its just a standard youtube embed code..
  12. ohh I had no idea that was how it worked! If I knew that a a long time ago, this would have been uch less of a challenge!
  13. FINALLY I got this working. You guys were right with the code, it was perfect, however it seems that when the page loads up my IE7 specific stylesheet, it does not omit the original stylesheet. It's actually reading from both somehow...it's very strange and I cannot explain how or why, but hey, it works now! Thanks for all your help on this matter! It's been a mess!
  14. Nevermind I fixed this. I just duplicated the popup page and renamed it. Then I added a JS reload once script into the original popup and had that popup submit to the second page instead of itself, which doesn;t contain the JS. This works great. Thanks for your suggestions!
  15. They dont have to update in both. I'm basically carrying over an entered email address into the popup window, but it doesnt show up in the popup window until I reload it. However, the popup is a form that submits to the same popup, and after the submission I have text that reads something like "submission successful". If I use a javascript reload, the text never shows up because after it submits to itself, it refreshes again...bypassing the second part of the code...know what I mean?
  16. Hi, I have a page with a form that saves the form data in a session variable, where it is recalled in a popup window. It carries over just fine, however it does not update until I refresh the popup window. Since the popup page submits to itself and echos text after submission, a javascript page reload script is not helping me since it makes the page bypass that part on the following reload. Anyone know what else I could do???
  17. YES! That worked! Thank You!! The email address doesn't carry over from the first page now, but I feel like that's a smaller problem to deal with Thanks a ton!
  18. Well...your code is cleaner definitely, and it does carry my email address over to the popup like I want, however when I submit all the info it is still reloading that page to a blank white page. This was the problem I was having before I posted the full code...It's obviously a php error...maybe I'm missing a semicolon ??? Looking through to see if I see anything
  19. Oh I see, so you're saying that when I had it carry over, the code at the bottom of the first page wasn't contributing to that happening, but I was taking care of it on the second page entirely... ?
  20. Thanks! I'll try this when I get home. The reaso I have $emailaddyon the first page is because I am using that variable to carry it over to the popup so that it is already filled in. I'll update about the results of this!
  21. ok well im looking to see how this is possible because IE7 is definitely loading my IE7 stylesheet (tested) but making these suggested changes are not doing anything in that stylesheet. You mentioned above that you tested in FF and IE6, however the problem only exists in IE7. IE6 and FF are running from my other stylesheet...
  22. I have it set just the way he said to do it. I have a seperate stylesheet for IE7..is that what you are looking at?
×
×
  • 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.