Jump to content

shocker-z

Members
  • Posts

    864
  • Joined

  • Last visited

Everything posted by shocker-z

  1. where is your excecusion of the mysql statement? you haven't shown the actual query. Regards Liam
  2. I can't think of any way except possible looking at the session file creation date if you have it save them to a dir on your server? why not just do as you said you dont want to but just creating a datetime stamp on creation? regards Liam
  3. Your looking at javascript to break out of iframe <script language="Javascript"> <!-- if (top.location!= self.location) { top.location = self.location.href } //--> </script> as using $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] will show the same if in iframe or accessing the actual page. the javascript way also means that if they do try and scam* you then theres actually doing them selves over. Regards Liam
  4. LIKE statements should be like this for everythign containing WHERE field LIKE '%$value%' By the looks of it you have WHERE filed LIKE %%'$value' You should definatly look at preventing injection attacks in your code as it looks very vunrable to SQL injection attacks. Regards Liam
  5. bamcompile is great in my opinion. http://www.bambalam.se/bamcompile/ I've using this and think it's absolutly great! I used it for my main code and passed variable to it from a .NET frontend, I dont know very much .NET so found it easier to do my code in PHP than .NET. Regards Liam
  6. Just have a google around for "php graph " the gpl, opensource, freeware stuff like that at the end and you'll find a few. Liam
  7. mind showing some code? As your asking for a solution but we dont know how it is at present. Regards Liam
  8. If you dont know the array then how can anyone possible script somthing for you? What's your code? Liam
  9. I think i used this one many years ago and it was decent. I was cerating a stats system for time off phones at work. http://www.aditus.nu/jpgraph/ regards Liam
  10. You've double posted mate http://www.phpfreaks.com/forums/index.php?topic=185518.0 Liam
  11. It's alright mate, the site has been tipsy all day! It got totally redirected to a hacking site earlier. Liam
  12. Come on i've done well over 1,000 posts dont you think i tried that? lol It was bout 30-60 minutes before the site got hacked. I couldn't even upload a txt file as i got access denied and the issue with it not posting was not a general thing. Had issues creating new topics also. Regards Liam
  13. Have you got a ocmmand line tool installed which does this? as i dont beleive there is any PHP classes out there for such a thing. Possibly pdf to HTML then HTML to image? Think that's the closest you'll get. Regards Liam
  14. Resolved using $xmloutput = $xml->xpath('/Report/Result/result/@value'); use @ value to pull our variable values. Regards Liam
  15. This might be of use http://www.phpclasses.org/browse/package/2286.html Regards Liam
  16. I havent tested but you could try putting the dates into an array and using sort() see link below http://uk2.php.net/manual/en/function.sort.php#76198 Regards Liam
  17. try this $c1=$_POST['checkbox1']; if($c1 !== '') { echo 'checked'; } else { echo "Error"; } Regards Liam
  18. I suppose if you ahve a site that has to be supper secure then yes md5 would stop injections as it would always return alphanumeric charactors. I generally hold userid from the username entered and verify by selecting password from table where username = 'xxx' and then check the md5 pass in database against one sent therefore it's securly checked and sessionid will only be stored after user and pass match anyway therefore there will be no injection attacks further down the line as username is in a session and already validated. Just my 2 pence. regards Liam
  19. If it's in a database then SELECT * FROM tablename ORDER BY date DESC that will return with the closest date first. Regards Liam
  20. foreach($_GET AS $key => $value) { ${$key} = $value; } Should do the job mate Liam
  21. I think this may be because of the activex control for flash being represented by a separate entity. Try this mate <?php session_start(); $_SESSION['language'] = 'Eng'; ech o $_SERVER['HTTP_REFERER']; ?> ech o has a space in as the forum is a bit frigged and wont allow me to submit posts with the word ech o without the space. What does it return? I'm guessing it will be the sqf location. Might want to set it to direct them to the homepage as they are unlikley to read 3 pages in english then suddenly realise that they are french. They are most likley just going to click straight away. Regards Liam
  22. Hi all, I was wanting to know how i can parse the name out of this XML Current code attached in txt file as this forum wont let me post it. comes up saying: Method Not Implemented POST to /forums/index.php not supported. Apache/2.2.0 (Linux) Server at www.phpfreaks.com Port 80 Code now shown below, what's happening to the forum people as i'm strugling to post new posts and replys with code in. <?php $xml = '<?xml version="1.0" encoding="UTF-8" ?> <Report> <Student> <name value="liam wheldon"/> <dob value="22/01/1985"/> <srn value="555"/> <grn value=""/> <mathsGrade value=""/> <englishLangGrade value=""/> <englishFirstLang value="Not entered"/> <otherLangHome value="Not entered"/> <otherLangWork value="Not entered"/> <otherLangFriends value="Not entered"/> </Student> </Report>'; if i change <name value="liam wheldon"/> to <name>liam wheldon</name> it will work fine so what do i need to do to change this to get it working as the xml above is a sniplet from XML output by an application which isn't likley to get changed. Regards Liam
  23. It is an array, what are you wanting to get out of it? Regards Liam
  24. If your running apache look at mod_rewrite Regards Liam
  25. What i normaly do for this is have a form for them to fill out, then after submitting it will go to a validation oage where i check for empty field and send them back if empty. After i've checked for this i will create there information in a table e.g. username password email name. As well as that i create an activation field in which i insert the value of $valcode=md5($email.date('Y-m-d G:i:s:u')); this will create a unique validation code for every user even if same email address or submitted twice (you ahould check for duplicate email addresses in your validation also) email them there validation coe in the form of http://www.somesite.com/validate.php?code=$valcode then in your validate.php file you select from db where activation = $_GET['code'] and ask for password and validate against that also. Once validated then set activation to NULL and then all you do on login is check to see if activation is null and if so then account is activated properly. Very brief but hope it helps. Regards Liam
×
×
  • 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.