recently i wrote a hit counter using php and sql and the gd lib
Click
If you somehow find a way to break it tell me how you did it :)
and im in in need of a regex for a name field like this
"firstname lastname";
Hit Counter
Started by Ryan, Feb 03 2008 07:07 PM
5 replies to this topic
#1
Posted 03 February 2008 - 07:07 PM
|
|
|
#2
Posted 04 February 2008 - 01:49 AM
Ryan said:
and im in in need of a regex for a name field like this
"firstname lastname";
"firstname lastname";
$Fullname = "firstname lastname";
$NameSplitted = explode(' ', $Fullname);
$Firstname = $NameSplitted[0]; // firstname
$Lastname = $NameSplitted[1]; // lastname
You've to modify the code of course. You'll have to check whether the user has more than one firstname (or lastname) and such things.
#3
Guest_Jaan_*
Posted 04 February 2008 - 04:39 AM
Guest_Jaan_*
if you have both names in one textbox then maybe users wont enter their lastname so that means you will not get their lastname.. so i suggest you to make 2 textboxes :)
#4
Posted 04 February 2008 - 02:58 PM
Jaan said:
if you have both names in one textbox then maybe users wont enter their lastname so that means you will not get their lastname.. so i suggest you to make 2 textboxes :)
ok thanks to both of you :)
#5
Guest_Jaan_*
Posted 04 February 2008 - 03:07 PM
Guest_Jaan_*
no problemo
#6
Posted 05 February 2008 - 05:25 AM
I created a user: test@test.com / test
and received:
Also, every time I hit reload the counter increases. You should consider adding IP information so that each browser can only give a +1 count per day or hour.
and received:
Warning: mysql_result(): link_url not found in MySQL result index 2 in /home/content/r/y/a/ryanfanshaw/html/omfg/count3.0/mysql.php on line 89 Warning: mysql_result(): link_url not found in MySQL result index 2 in /home/content/r/y/a/ryanfanshaw/html/omfg/count3.0/mysql.php on line 89 Warning: mysql_result(): link_url not found in MySQL result index 2 in /home/content/r/y/a/ryanfanshaw/html/omfg/count3.0/mysql.php on line 89 Warning: mysql_result(): link_url not found in MySQL result index 2 in /home/content/r/y/a/ryanfanshaw/html/omfg/count3.0/mysql.php on line 89 Warning: mysql_result(): link_url not found in MySQL result index 2 in /home/content/r/y/a/ryanfanshaw/html/omfg/count3.0/mysql.php on line 89 Warning: mysql_result(): link_url not found in MySQL result index 2 in /home/content/r/y/a/ryanfanshaw/html/omfg/count3.0/mysql.php on line 89 Warning: mysql_result(): link_url not found in MySQL result index 2 in /home/content/r/y/a/ryanfanshaw/html/omfg/count3.0/mysql.php on line 89
Also, every time I hit reload the counter increases. You should consider adding IP information so that each browser can only give a +1 count per day or hour.


Sign In
Create Account

Back to top









