fotospace.mobi registration error

Started on the old forum in April 2010 · view the original in the archive · old links redirect here

12 replies · 1,249 views · started 16 years ago · 1 min read

3 participants
mobidev Senior · 312 posts #1

Hi guys I'm using the fotospace.mobi script and get error on registration and I think its not sending the info to the db

My demo: http://fotospace.carlsworld.uni.cc

I can't upload the script I tried not even opera mini or bolt browser allows me to upload it here strange can on other sites... Anyway here the insertuser.php Code:

<?php include("./scripts/header.php"); include('./scripts/outside.inc'); // Strip the requested name from all bad stuff function is_email($email) { return(preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mobi|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i",$email)); } function strip_name($string) { $string = ltrim($string); $string = ereg_replace(chr(10),"",$string); $string = ereg_replace("&","",$string); $string = ereg_replace("<","",$string); $string = ereg_replace(">","",$string); $string = ereg_replace("\"","",$string); $string = ereg_replace("\|","",$string); $string = ereg_replace("\\\$","",$string); $curcharlength = strlen($string); $outstring = $string; for ($i = 0; $i <= ($curcharlength-1); $i++) { $curchar = substr ($string,$i,1); $ochar = ord($curchar); if ($ochar > 122) { $new = "" . strtoupper(dechex($ochar)) . ""; $outstring = ereg_replace($curchar,$new,$outstring); } if ($ochar < 32) $outstring = ereg_replace($curchar,"", $outstring); } $outstring = ereg_replace("£","", $outstring); return $outstring; } if (empty($HTTP_X_UP_SUBNO)) { $subno = gethostbyaddr ($REMOTE_ADDR); } else { $subno = $HTTP_X_UP_SUBNO; } // Assigns the info to a more memorable (and shorter) name $pip = $HTTP_X_FORWARDED_FOR; $agent = $HTTP_USER_AGENT; // now getting info thats been past on from the last page (im pretty sure that this is not needed // but lets leave it just in case) $username = "$username"; $password = "$password"; $email = "$email"; $sex = "$sex"; $username=preg_replace('/[^0-9a-z ]+/i', '', $username); $username=preg_replace('/[^\w\d\s]+/i', '', $username); $password=preg_replace('/[^0-9a-z ]+/i', '', $password); $password=preg_replace('/[^\w\d\s]+/i', '', $password); // oh look! our first piece of WML! echo " "; // This checks that the user has entered all reqired info if (isset($username) && isset($password) && isset($email)) { // Checks the requested username against those already in the database.// if ($num_rows_s >0) { echo "**error** $breaker sorry, someone else has used that email address! <a href=\"register.php\">try again?</a> <a href=\"index.php\">forget it</a> $breaker"; } // You are a winner! commence with Registermification!! elseif ($num_rows_s <1) { $query_insert = " INSERT INTO forum_users ( username, password, email, subno, origsubno, agent, age, sex, place, joindate, lastactive ) VALUES ( '$username', '$password', '$email', '$subno', '$subno', '$agent', '$age', '$sex', '$place', now(), now())"; $result = mysql_query("$query_insert"); // eeek!! something happend, abort! abort! if ($result == false) { echo "**error!** $breaker sorry, someone else has used that username! <a href=\"register.php\">try again now?</a> <a href=\"index.php\">forget it</a> $breaker"; } // All went well?, GIVE THEM THE GOOD NEWS!! elseif ($result == true) { $query2_insert = " INSERT INTO mail ( userto, author, subject, sentdate, message ) VALUES ( '$username', 'fotospace', 'hello $username!', now(), 'welcome to FotoSpace.mobi, we hope you enjoy your stay. If u need help contact the site owner or any of the admin team.' )"; $result2 = mysql_query("$query2_insert"); echo "You have been registered. Any Illegal Chars have been removed. Your username is **$username** and your password is **$password** Please log into your account and have fun. FotoSpace.mobi $breaker <a href=\"index.php\">Go Login Now</a> $breaker"; } } } // Oh, somethings went wrong before it all even started... else { echo "**error!** you can't submit a form if one or more fields is empty, please go <a href=\"./register.php\">back.</a>"; } echo " </body></html>"; ?>

Subzero or rider or some1 can u check this coding if its correct...

Mysterio Lead · 630 posts #2

I am in mobile and I have drink a lot. Post here the forum_users table. Code seems ok but I am not sure till morning.

mysterio.al - programming is a functional art

mobidev Senior · 312 posts #3

Thx here is forum user sgl:

-- -- Table structure for table forum_users

CREATE TABLE IF NOT EXISTS forum_users ( id int(11) NOT NULL auto_increment, username varchar(16) NOT NULL default '', password varchar(60) NOT NULL default '', ses varchar(50) NOT NULL default '', email varchar(50) NOT NULL default '', subno varchar(100) NOT NULL default '', origsubno varchar(100) NOT NULL default '', agent varchar(200) NOT NULL, pip varchar(40) NOT NULL default '', opip varchar(40) NOT NULL default '', joindate datetime default '2008-07-17 00:00:01', posts varchar(10) NOT NULL default '0', visits int(10) NOT NULL, sicn int(1) NOT NULL default '1', uicn int(1) NOT NULL default '1', lastactive datetime NOT NULL default '0000-00-00 00:00:00', location varchar(50) NOT NULL default '', tmax varchar(5) NOT NULL default '8', sig text NOT NULL, title varchar(100) default NULL, nname varchar(40) NOT NULL default '', age char(2) NOT NULL default '', place varchar(30) NOT NULL default '', ban_status int(1) NOT NULL default '0', ban_by varchar(20) NOT NULL default '', filter int(1) NOT NULL default '0', valid char(3) NOT NULL default 'yes', quiz_score int(11) NOT NULL default '0', userlevel char(1) NOT NULL default '3', quiz_admin char(3) NOT NULL default 'no', quiz_e_played char(3) NOT NULL default 'no', quiz_m_played char(3) NOT NULL default 'no', quiz_h_played char(3) NOT NULL default 'no', pmax varchar(5) NOT NULL default '6', visibility char(3) NOT NULL default 'yes', inbox varchar(5) NOT NULL default '1', sex varchar(6) NOT NULL default 'male', circle_of_trust varchar(7) NOT NULL default 'outside', ban_why text NOT NULL, simages char(3) NOT NULL default 'on', dodgy char(3) NOT NULL default 'no', shortcuts char(3) NOT NULL default 'on', mydir char(3) NOT NULL default 'no', usedup varchar(20) NOT NULL default '0', mylot varchar(20) NOT NULL default '0', alerts varchar(7) NOT NULL default 'on', owner char(3) NOT NULL default 'no', css char(3) NOT NULL default 'on', admin1 varchar(40) NOT NULL default '(member)', popup varchar(3) NOT NULL default '1', popup_frmbuds varchar(3) NOT NULL default '0', fav varchar(200) NOT NULL default '', fav1 varchar(200) NOT NULL default '', fav2 varchar(200) NOT NULL default '', fav3 varchar(200) NOT NULL default '', fav4 varchar(200) NOT NULL default '', fav5 varchar(200) NOT NULL default '', mor varchar(200) NOT NULL default '', mor1 varchar(200) NOT NULL default '', mor2 varchar(200) NOT NULL default '', mor3 varchar(200) NOT NULL default '', mor4 varchar(200) NOT NULL default '', mor5 varchar(200) NOT NULL default '', looks varchar(200) NOT NULL default '', looks1 varchar(200) NOT NULL default '', looks2 varchar(200) NOT NULL default '', looks3 varchar(200) NOT NULL default '', looks4 varchar(200) NOT NULL default '', looks5 varchar(200) NOT NULL default '', propic char(3) NOT NULL default '0', chatroom char(50) NOT NULL, chattimer datetime NOT NULL default '0000-00-00 00:00:00', cmax char(2) NOT NULL default '10', vote int(10) NOT NULL, spacemsg varchar(100) NOT NULL default 'welcome to my fotospace!', flags varchar(10) NOT NULL default 'flag.gif', shout char(1) NOT NULL default 'Y', PRIMARY KEY (id), UNIQUE KEY username (username) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- -- Dumping data for table forum_users

mobidev Senior · 312 posts #4

Can some1 from admin or mods give me their email adres so I can mail the whole script. I can't upload to codingtalk not on a pc anymore and not even opera mini v4 and v5beta or bolt browser works to uploads to coding talk weird since I can upload to my server from them....

subzero Super moderator Fellow · 3,954 posts #5

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Mysterio Lead · 630 posts #6

what message do you get when try to register?

mysterio.al - programming is a functional art

mobidev Senior · 312 posts #7

Mysterio3 I got it sorted out thx all I dit was delete the php.ini file and replaced it with .htcaccess file that I had in my wap chatroom on my site. Seems it needed register globals turned on..

@ subzero I will add the htcaccess file to the script and rezip it and then mail you it realy is a nice script... Now I'm just finishing uploading some missing pages from my phone and then I'm gona set me as owner.

Mysterio Lead · 630 posts #8

mobidev wrote: Mysterio3 I got it sorted out thx all I dit was delete the php.ini file and replaced it with .htcaccess file that I had in my wap chatroom on my site. Seems it needed register globals turned on..

happy for you

mysterio.al - programming is a functional art

subzero Super moderator Fellow · 3,954 posts #10

here is the script as you sent it i did the adding

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Attachments: fotospace.zip
subzero Super moderator Fellow · 3,954 posts #12

done. and moved...

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

mobidev Senior · 312 posts #13

Thx sub. Am sorting out the kinks now on what folders to cmod etc. And then I'm gona start with new css layout don't realy like current 1. Aswell some places links don't appear to be at right places

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close