Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Destramic

  1. 1. its not a valid html document 2. why echo html when there is no need? <div> <form id = 'form1' action='#' method='post' > <select name='room' id='room'> <?php if(isset($displayed)) echo "<option selected>".$displayed."</option>"; $i = 0; while($i < count($rooms)) { $room = $rooms[$i]; if($room === $displayed)echo ""; else echo "<option value = ".$room." > ".$room." </option>"; $i++; } ?> </select> <noscript><input type='submit' value='Submit'></noscript> </form> </div> 3. i don't really understand you question, i can only guess your looking for something like http://twig.sensiolabs.org/ you could also put $(document).ready(function(){ $('#room').change(function(){ $(this).parent('form').submit(); }); }); into a .js file and include as a script like your jquery if($room === $displayed)echo ""; just seems unnecessary something like this would make more sence while($i < count($rooms)) { $room = $rooms[$i]; if($room !== $displayed) echo "<option value = ".$room." > ".$room." </option>"; $i++; } and try and make your code presentable? <?php print_r($_POST); $rooms = array(1, 2, 3, 4); $displayed = 2; ?> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#room').change(function(){ $(this).parent('form').submit(); }); }); </script> <div> <form id = 'form1' action='#' method='post' > <select name='room' id='room'> <?php if(isset($displayed)) echo "<option selected>".$displayed."</option>"; $i = 0; while($i < count($rooms)) { $room = $rooms[$i]; if($room !== $displayed) echo "<option value = ".$room." > ".$room." </option>"; $i++; } ?> </select> <noscript><input type='submit' value='Submit'></noscript> </form> </div>
  2. i know this thread is answered now, but one thing did pop into my head which i have been meaning to ask. in the scenario that every email address is encrypted, how do you check that an email address isn't already registered with an account? the only method i can think of is to loop all the email address, where they are decrypted and compared...just seems a bit long winded and probably a bit heavy on cpu and memory, depending on user count (i will post a new thread if needed, sorry) thank you
  3. Guess I won't be using an email address as a login credential. Thank you for great explanations
  4. I'd try to use phpmailer instead of php's mail function. https://github.com/PHPMailer/PHPMailer Or why not allow the contact data to be inserted into a db table?...atleast that way you know your going to receive it
  5. I suppose you need to cover all angles...im just put off with the catcha for my site at the moment as I believe it could scare people away. I do like the invisible field method though. @requinix you mentioned wait until bots become problem...just wonder how I would know that bots were registering on my site? thank you
  6. Thank you for clearing that up...what confused me also in my thinking is that you see companies like Facebook, PayPal etc using email address as a username. Would you need to select all users, decrypt email address and compare to select row? Or would there be a simpler approach? thank you
  7. hey guys, i want to encrypt email address and passwords (after password_hash) but this then makes things very awkward when it comes to login...if your asking a user to put username/email address and he provides an email address (which is encyrpted in db)...how on earth do get user's row? the only answer i can think of is not to encrypt email address', but i'd say its sensitive data and needs to be just a little boggled with this, if someone can please shine some light. thank you.
  8. ofcourse they will see a hidden link...thats one of the bots job to seach for href's...the bot will find it...and if bad bot he will try to open link?
  9. it appears the bundle sent from comodo was put together wrong. i had to put my domain cert with my intermediate certificates in order and finally convert to .pem not going to lie, it was tough but it worked thanks for the good advise requinix
  10. hey guys im getting an nginx error message when trying to use ssl on my server: i've added the following to my nginx config: ssl_certificate ssl/domain.ca-bundle; ssl_certificate_key ssl/domain.key; domain.ca-bundle - my certificate bundle sent to me from comodo domain.key - my private key generated with my RSA key i've search the net, and i read that the i need to remove passphrase from key openssl rsa -in domain.key -out newkey.pem but that didnt work either any help would be appreciated as i'm truly stuck now. thank you
  11. sorry requinix...a user register form for instance...a bad bot could fill out form and insert numerous rows...this is my concern as i have nothing in place yet to capture bad bots doing this. is a bot capture as seen in the link above a good enough idea...or what is the best solution please? thank you
  12. exactly...bad bots won't respect the robots.txt...so if they access a hidden link no visible to human the bad bot will open it. when that link is opened, the ip and user agent is added to db, but firstly checking its not a good bot, just for good measures...so as soon as someone access' the site i can check if its a bad bot from db records and die; i saw the idea from https://perishablepress.com/blackhole-bad-bots/ whats your thoughts? thank you
  13. when i refer to crawler i mean bad bots or have i got the wording incorrect? adding onto what i said, i did some more looking about, and what seems to be a good example is a simple hidden link, disallow the link in my robot.txt so the good bots don't open it....and if accessed catch the bad bot? maybe there are better alternatives
  14. how effective is browscaps crawler these days please guys? i need to implement something to stop any crawlers inserting rows into db...hopefully browscap if it's any good...i really hate the idea of image/sum/google captures. what would be my best method please? thank you
  15. worked a charm thank you kicken
  16. i moved all the data in C:\ProgramData\MySQL\MySQL Server 5.7 to another drive and tried to config the my.ini in C:\ProgramData\MySQL\MySQL Server 5.7 so it will read and store data from ther drive i know it can be done but i'm obviously doing something wrong
  17. hey guys i've fiddled about with my mysql datadir and i've buggered it! what have i done wrong please C:\WINDOWS\system32>net start mysql57 The service is starting or stopping. Please try again later. so my - my.ini and data folder was in C:\ProgramData\MySQL\MySQL Server 5.7 i copied all the files/folders into R:\localhost\mysql stopped mysql and edited the my.ini inside the C:\ProgramData\MySQL\MySQL Server 5.7 directory. edited: under [mysqld] basedir=R:/localhost/mysql datadir=R:/localhost/mysql/Data i have no error log and now i'm completely stuck....i'd like to know how it is done, worst comes to the worst i can just reinstall mysql 5.7 and leave it alone thank you
  18. it's hard to build a good framework in my opinion...i'm currently re-designing mine which i made 3 years ago....but with mine you have the view, modlel, controller but also the module which i get quite confused at and have yet to understand fully what's used for...that aside as you questions are not too specific and i'd suggest to download a framework such as zend (like i did) and spending time reading the manuel and stripping apart the code to understand the logic and the design of a framework first of all i have a router class which matches routes to a specific uri, then the controller, action and parameters are dispatched and load the contoller... the controller i'm able to access the view and the model i think if your trying to build a mvc, which is good in my optioin, cause i hate to use code i haven't written myself, then you you need to break down what each element does and how it's going to perform, plus cut out all the BS! inbetween. posting some code would be useful and maybe we could give you some points.
  • 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.