2old2learn? Posted May 18, 2011 Share Posted May 18, 2011 HeyI am working on a login script that looks pretty good..right now I get this error on the register.php return preg_match("^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$", $email); This is the error message: Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in C:\xampp\htdocs\html_login\source\include\formvalidator.php on line 237thanksLOL ... sorry solved..return preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/", $email); Do you see where I found the error??But now I get a new error message...LOL Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'billj'@'localhost' (using password: YES) in C:\xampp\htdocs\html_login\source\include\fg_membersite.php on line 497LOL...again damn even before I posted the above error I think I found the solution...but I will still post it just in case....LOLWell, you see I am trying made an adjustment..to script and now get this error..Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '{' or '$' in C:\xampp\htdocs\html_login\source\include\fg_membersite.php on line 497here is the code for fg_membersite.php line 497 file..$this->connection = mysql_connect($this->'localhost',$this->'root',$this->''); Cheers.. Link to comment Share on other sites More sharing options...
2old2learn? Posted May 18, 2011 Author Share Posted May 18, 2011 D/P Link to comment Share on other sites More sharing options...
thescientist Posted May 21, 2011 Share Posted May 21, 2011 Hey$this->connection = mysql_connect($this->'localhost',$this->'root',$this->''); it should either be something like$this->connection = mysql_connect('localhost','root',''); or $this->connection = mysql_connect($this->domain, $this->username, $this->password);//assumed variable names, but used to illustrate a point depending on your application, because this syntax $this->'string'; is incorrect. Link to comment Share on other sites More sharing options...
2old2learn? Posted May 23, 2011 Author Share Posted May 23, 2011 Hey sorry for not getting back on this ...sooner...but took a bit of a break..from all of this..absorbing abit too much..and many scripters..have different styles of doing scripts so I was getting confused..especially for login scripts..many of which are dated..and have to do a whole re-work of their script work in order for them to work...as for db connect: $this->connection = mysql_connect('localhost','root',''); Yea went that direction but still in a different way though..: $con = mysql_connect("localhost","root",""); if (!$con){ die('Could not connect: ' . mysql_error()); }; mysql_select_db("tecicc", $con); found this one works better...looking to make a single config.php file for connections and other function/include files..to make all easier.. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.