Not sure if he meant. And not everybody can be professional programmer.
Not sure if he meant. And not everybody can be professional programmer.
KiruHoshino, not that.
It has nothing to do with the selectbox.
On profiles, when i do <? echo $profiel['land']; ?> i will get as result the full name (Netherlands).
I want to select te abbreviation from the database table `landen`.
So i can make country flags
Spoiler:
Last edited by Sphinx; 25-12-13 at 05:52 AM.
Just echo theabbrivation beside the country name in between the option tag
- - - Updated - - -
I am not a professional
- - - Updated - - -
Well U need to do is
Select from landen where name = to the user's seletected country
And name the variable something
Thatts it and echo it
- - - Updated - - -
I will make one for u when I reach home
Last edited by Sphinx; 25-12-13 at 06:05 AM.
yeah !
- - - Updated - - -
then echo the country
I want to share the country flag script! (Includes more than 240 country's +sql)
[hide]
Step 1:
Spoiler:
Step 2:
Spoiler:
Step 3:
Spoiler:
Step 4:
[/hide]Spoiler:
Btw, thx Raftaar for helping me a hand.
Nevermind it was a petty job
:D
Best of luck
- - - Updated - - -
Bug Report >
Progress
Added Limitations and usage
( Works when more than 5 items used ) ( if used one after another)
otherwise the bug still works and we can use any item unlimited time
Added Slow down time error but its not working properly
need some help in it
- - - Updated - - -
Anyone ?
Can someone help me :$
I would love to filter all special characters in my textfields, I only want A-Za-z0-9 and know that its something with preg_replace but i don't know how to use that shit XD
If its possible i would like that the website return a message when submitted (and doesnt update in db ofcourse).
Please also tell me what i've to do with the input after i placed the preg_replace shit.
Last edited by Raggaer; 27-12-13 at 03:31 AM.
why not use something like:
With this, you won't even have to process the special keys because users won't even be able to input them in the first place. It's a handy thing to use.Code:<html> <head> <title>Hello</title> </head> <script> function validate(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /[0-9a-zA-Z]|\./; if( !regex.test(key) ) { theEvent.returnValue = false; if(theEvent.preventDefault) theEvent.preventDefault(); } } </script> <body> <form method="post"> <input type='text' onkeypress='validate(event)' /> </form> </body> </html>
as for your 2nd part of the post
make sure you use if(isset($_POST['submit'])).
inside there you can simply process the code and then add checks that do one thing at the time
Then you can just add something like
if(something went wrong) $error = "this thing went wrong"
and at the end of processing you can have
if(!isset($error)) process code, add to db, etc,
else echo $error;
dunno if this really made sense, but oh well.
teehee, 369th post. :D
Lol js and jQuery can be changed in inspect element .. Use PHP validation @Kratos147