Jump to content

JTallis

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JTallis's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sweet. I changed it around alot. #msg is now inside the form (#rsForm). It now works. This is the new Ajax. $(function() { $("#resend").click(function() { $("#rsForm").hide(); $("#loading").show().html('<img src="http://www.kanawhavalleyre.com/images/loading_circle.gif" />'); $.ajax({ type: "POST", url: "modules/rsactivation/rsact.main.php", data: {email: $("#email").val()}, cache: false, success: function(html){ $("#loading").hide(); $("#rsForm").show(); $("#msg").html(html); } }); return false; }); });
  2. Oops, sorry my bad. you can see here. CLICK ME
  3. I'm using Ajax to process a form. Code is below. It works fine, but what happens is.. the error is inside the table. So when I hide the previous form. If an error occurred, it'd populate the new div with the same kind of table, but with an error in. When processing the form again with this ... new div, it refreshes the page. So what I tried to do, is change the original forms HTML with the Ajax, and insert the HTML gotten from the validation (on form processing) but this never worked. It broke the whole script basically. $(function() { $("#resend").click(function() { $("#rsForm").hide(); $("#loading").show().html('<img src="http://www.kanawhavalleyre.com/images/loading_circle.gif" />'); $.ajax({ type: "POST", url: "modules/rsactivation/rsact.main.php", data: {email: $("#email").val()}, cache: false, success: function(html){ $("#loading").remove(); $("#msg").prepend(html); $("#msg").show(); } }); return false; }); }); rsact.main.php basically has the processing in it. It returns stuff where required. You can view what goes on [url=http://"http://www.horble.com/resendactivation.php"]Here. When clicking the button once, it looks fine, it works fine. Though when you click it again, it refreshes the page. #rsForm holds the original form that works, but #msg holds the new form given from rsact.main.php. As already noted, I tried to change the code to edit #rsForm and insert the output given from rsact.main.php but it never worked. Do you have any ideas? Thanks
  4. PFMaBiSmAd, how would you display birthdays within a 7 day range... (So it'd display 7 days before their birthday, and would stop displaying after their birthday) Like this.. At the moment, we came up with something similar to this.. As you see from this, the day after Tuesday, October the 6th.. is Friday the 7th. So... we kinda screwed up. How would you do it?
  5. oh I see. I'm not sure, it's something I'd like too. Though I think you can pass the value into the redirect URL in the JS Function, and then use a GET. Though that would allow someone to manually type it in.
  6. The CSS of this forum has gone crazy with this thread. lol. It's all pushed across > Anyway, along with what I've posted and asked... how can I get upcoming birthdays without having to do hundreds of queries for each user.
  7. For an update of the above, with strtotime. Here.. http://www.horble.com/test.php The 2 without timestamps, do not work. The 2 with, do work. I used this code. echo strtotime("2010/24/12") . ' (YYYY/DD/MM)<Br />' . strtotime("12/24/2010") . ' (MM/DD/YYYY)<br />' . strtotime("2010/12/24") . ' (YYYY/MM/DD)<br />' . strtotime("24/12/2010") . ' (DD/MM/YYYY)'; All based on 24th December 2010.
  8. Unfortunately, nope. Try this out echo strtotime("24/12/2010") . ' - ' . strtotime("12/24/2010"); The first is DD/MM/YYYY, the second is MM/DD/YYYY. For me, it would only display the second date in timestamp. I was told the first, strtotime is thinking 24 is a month, but it isn't a month so it fails.
  9. JTallis

    Security

    If you wanted to go slightly more secure, forget the Email, and send an Email to the customer containing a password. This password would need to be used to access the invoice. So the URL needs to contain an encrypted invoice ID, and the customer needs to input their password. The password would be in the invoice table in the database or whatever is containing the invoices. So you can check if it's a valid login. Sorry I didn't think of this before hand.
  10. It's saying that STDIN is not a valid arguement. What is STDIN? I'm not sure. I googled it with an error like what you have. This seemed to of fixed the problem define('STDIN', fopen("php://stdin","r"));
  11. Use an onchange event. Maybe... onchange="doThis(this.value)" within your dropdown. What do you mean behind it? The way I would do it, unless there is a better method.. is have two values in the drop down - "Value1" and "Value2" Then within the head tags, create a function.. <script type="text/javascript"> function doThis(VALUE) { if(VALUE == "Value2") { window.location = "URL"; } } </script> Replace URL with the url to go to. This may work.
  12. As you may of guessed, it's a nightmare. If my birthday is on 10th June GMT, it would still be my birthday on the 11th June in Australian time. Though.. the 11th June, is not my birthday. It's not hard to understand this bit as Australia is like.. many hours ahead. Though when it comes to PHP... if I used some Timezone plug-in then this would bring up the same result as it does now. Though when that persons age is displayed... if my birthday is 10th June at 1AM, in America, it would be the 9th June. There for, they won't see my age change to 18 until it is 10th June their time. To prevent this, is when calculating the persons age, you would be adding their timezone offset onto their birthday timestamp. So regardless on what day it is around the world, if they are celebrating their birthday... then it's their birthday all around the world even though it's different times. To do this, i would need timezone offsets. I would have a field in the database I assume. I would convert their DOB to timestamp. I would add their offset onto that timestamp or take it away and display whatever result that gives to every user. This would display their age as whatever to every user. The next problem is... strtotime works in MM/DD/YYYY, so how do I make it work with DD/MM/YYYY ? I'm actually not making much sense, how would you work with Timestamps and Ages? Also for my next question question, if I had someones DOB, how do I bring up their next birthday out of it for when I am displaying "Bobs birthday is on the..." Now for final, apparently on 19th Jan 2038 the UNIX Timestamp will cease to work due to a 32-bit overflow. How can this be true when converting a date in the year 2500 still brings a timestamp?
  13. JTallis

    Security

    I imagine that's an ID that's been encrypted, right? That would be more secure than it just being the actual ID. Eventually after so many invoices, people will be able to type in a random ID and it'll bring up someones invoice. You don't want that. If it's encrypted, that's better, maybe add in the customers Email Address too. So for guessers, it's not only just the invoice ID, they need the invoice customers email too. If anyone gets through that, then .. it's just tough luck I guess. I'm not a master with invoices, but that's my throw-in for you.
  14. No, what I mean is.. for a help section. I already have "forgot password" and "suspension/ban" of-course, people can get around bans but... some people have had to contact the site they were banned on to find out why, and sometimes apply to be unbanned. The reason why I'm not going to provide IP Bans, is for what you said, they change. It would end up banning some innocent person when ones IP changes. I just need to know what problems users could encounter whilst registering. Safe ones. I mean.. there is something like "Not accepting your details?" but... a problem like that would only happen when the registration form has changed recently. Anything else than that... would usually be someone inserting invalid characters... which will be displayed in the errors. If I again haven't made myself clear, let me know. What would be the two main problems a user could encounter when registering, and also only mention ones that aren't going to be a security issue.
×
×
  • 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.