Eggie
Jan 30 2008, 11:21 PM
i have created a website and it is not working properly... i have had a website on sphosting.com and everything worked fine till i got some errors(i got the errors because of the crappy host)...now the fun part starts...they said they solved the problem but i got another one..i said them to repair it again and they did...now i tried to login but as i entered the info it said the info isn't correct...i checked the SQL and everything seemed fine..i tried again and again the error came...i tried than to register,entered ALL info and when this was suppose to come out "You have now registered to play $gamename. Please check you e-mail for the verification link. E-mail can take up to 24 hours to recieve, please be patient" the register.php was there again ... i uploaded the script that I KNOW that worked fine before i made major updates on the scripts and it didn't work... i changed my host and installed the newer script and the let me call it "default" script and none worked... i think the problem could be that it doesn't connect to my database correctly but the news on the index.php is in the database and it's correctly shown without any problems...i even tried the CODE echo mysql_error(); and it didn't work does anyone have time to see my scripts and see what is wrong?? EDIT:BTW:i use p_connect for connecting to my database
Comment/Reply (w/o sign-up)
vujsa
Jan 31 2008, 06:47 AM
QUOTE(Eggie @ Jan 30 2008, 06:21 PM)  i have created a website and it is not working properly... i have had a website on sphosting.com and everything worked fine till i got some errors(i got the errors because of the crappy host)...now the fun part starts...they said they solved the problem but i got another one..i said them to repair it again and they did...now i tried to login but as i entered the info it said the info isn't correct...i checked the SQL and everything seemed fine..i tried again and again the error came...i tried than to register,entered ALL info and when this was suppose to come out "You have now registered to play $gamename. Please check you e-mail for the verification link. E-mail can take up to 24 hours to recieve, please be patient" the register.php was there again ... i uploaded the script that I KNOW that worked fine before i made major updates on the scripts and it didn't work... i changed my host and installed the newer script and the let me call it "default" script and none worked... i think the problem could be that it doesn't connect to my database correctly but the news on the index.php is in the database and it's correctly shown without any problems...i even tried the CODE echo mysql_error(); and it didn't work does anyone have time to see my scripts and see what is wrong?? EDIT:BTW:i use p_connect for connecting to my database Well, just looking at your method, I have no idea what p_connect is! Did you mean pg_connect or pg_pconnect? If so, those are for PostgreSQL Databases which are different than MySQL databases! Anyway, nobody will be able to help you with your problem without seeing some code. Additionally, this sounds more like a PHP issue than a SQL problem. vujsa
Comment/Reply (w/o sign-up)
yordan
Jan 31 2008, 10:44 AM
Maybe one simple test could be to use phpMyadmin with this user's name and password, in order to see if the user exists. then, you should also verify that the user's tables still exist and have rows.
Comment/Reply (w/o sign-up)
Eggie
Jan 31 2008, 02:19 PM
QUOTE(yordan @ Jan 31 2008, 11:44 AM)  Maybe one simple test could be to use phpMyadmin with this user's name and password, in order to see if the user exists. then, you should also verify that the user's tables still exist and have rows. i checked sql database and there is that table...but no information in it after i register a account... @vujsa: mysql_pconnect("","",""); i meant i use that  and for the code-i asked if someone wants i can grant him my account information so he can check it if he wants... but i ain't gonna post it on the forum
Comment/Reply (w/o sign-up)
yordan
Jan 31 2008, 02:37 PM
QUOTE mysql_pconnect("","",""); i meant i use that and for the code-i asked if someone wants i can grant him my account information so he can check it if he wants... I guess that vujsa wanted to have some lines from your php source code around the "connect" word, in order to see what could explain not being conneted. The username and passord is here a useless detail, the important thing is the syntax of the php lines trying to connect. Or you can, as usual, say myname/blahblah or blah/password, just to explain where you put the password. As a matter of example, when I talk with my Oracle support I say "I try sqlplus blah/brol ", and everybody knows that here "blah" stands for my username and "brol" replaces my secret password. And the syntax sqlplus blah/brol has to be accepted unless the RDBMS system is down.
Comment/Reply (w/o sign-up)
Eggie
Jan 31 2008, 02:48 PM
i meant that i will give you my Cpanel login information if you want to help me so i don't need to copy the entire page of "config.php" or "register.php" because it will be too long and people will think that i'm doing it for credits which i wouldn't like (but i can do it if you want me to) and i will be denied once more for the hosting and i don't want that
Comment/Reply (w/o sign-up)
yordan
Jan 31 2008, 02:52 PM
OK, you are right. vujsa will PM you if he prefers working that way.
Comment/Reply (w/o sign-up)
Eggie
Jan 31 2008, 03:18 PM
QUOTE(yordan @ Jan 31 2008, 03:52 PM)  OK, you are right. vujsa will PM you if he prefers working that way. Can't you help me?  i would like help from anyone only if he's not so stupid that he steals my scripts or delete my hosting plan but i think that noone will...i believe that people won't fool me:) i hope i'm right
Comment/Reply (w/o sign-up)
yordan
Jan 31 2008, 03:26 PM
QUOTE Can't you help me? I would if I could. Unfortunately, I'm not a king in php. I'm only able to use the automatic scripts within the astahost cpanel, where you have nothing to do except giving your account name and password. So, if something is wrong inside one of your scripts, let's wait until one of the php gods around here come and have a look.
Comment/Reply (w/o sign-up)
faulty.lee
Jan 31 2008, 04:27 PM
I think you should give a clearer picture of what's your situation and the error message you're getting. I'm guessing that the script you're referring to is a game engine or sort of alike. And now you're facing the problem of connecting to your SQL database? But the previous problem with your hosting wasn't clear at all, are they also related to the SQL problem? What kind of error was that? Maybe with more information we can help you narrow down your problem. We don't actually need your login to see your code. We actually prefer for you too look into it yourself, while we provide you some guidance, that way you can learn better, and be able to tackle any future problem. I'm sure they'll be more problem coming along if you're doing programming. Anyway, for troubleshooting, you should try to eliminate the problem one by one. For example, now that you cannot connect. Maybe you can create a simple page, with just a few line of code to connect to you SQL database, and see if it works. This will confirm that your username, password and database is correctly configured. If not, you can also try diff method of connecting, to eliminate problem from a particular SQL library. So the list goes one, until you are left with 1 or more item that's contributing to the problem. Then you can start to think of a solution, including "shooting" at your hosting. Good Luck
Comment/Reply (w/o sign-up)
vujsa
Feb 3 2008, 04:01 AM
Well, I'm not about to try and figure out what your script is or isn't doing but we can look at the most common causes! First, you need to get you PHP info! If your host is using PHP 5, by default mysql is turned off and mysqli is required instead. CODE echo phpinfo(); Next, you should try and echo your queries as well so that you can see what the server sees. change: CODE mysql_query("insert into players (user, email, pass, question, answer, class) values('$new_user','$new_email','$db_pass5', '$sec_question', '$sec_pass','$charclass')") or die("Could not register.. trouble with adding you to the players table."); to: CODE $query = "insert into players (user, email, pass, question, answer, class) values('$new_user','$new_email','$db_pass5', '$sec_question', '$sec_pass','$charclass')"; echo $query; mysql_query($query;) or die("Could not register.. trouble with adding you to the players table."); That'll make a mess of your pages but will show you if the query is not being built correctly. It is a good idea to actually run those queries manually in phpMyAdmin to be sure that they work. The style in which your code is written makes it very difficult to debug! I also don't connect to my database the way you do and never use the persistant connection but if you haven't had trouble before, then I can't imagine that it is the trouble now. vujsa
Comment/Reply (w/o sign-up)
Eggie
Feb 2 2008, 09:44 PM
QUOTE(Feelay @ Feb 2 2008, 10:13 PM)  yes. Put my code: CODE <? $con = mysql_connect('localhost','MySQL_Username','MySQL_Password'); if (!$con) { die('Could not connect: ' . mysql_error()); }
mysql_select_db('MySQL_DbName',$con); ?> in config.php Instead of this CODE mysql_pconnect("localhost","eggie_Eggie","jajetic"); mysql_select_db("eggie_Eggie"); ok..but i can't now...my girlfriend is here and she's pissed...i will post here if it solved the problem or it didn't and thank you for posting  EDIT:i tried it and still nothing...i really don't know why....damn
Comment/Reply (w/o sign-up)
Feelay
Feb 2 2008, 09:13 PM
yes. Put my code: CODE <? $con = mysql_connect('localhost','MySQL_Username','MySQL_Password'); if (!$con) { die('Could not connect: ' . mysql_error()); }
mysql_select_db('MySQL_DbName',$con); ?> in config.php Instead of this CODE mysql_pconnect("localhost","eggie_Eggie","jajetic"); mysql_select_db("eggie_Eggie");
Comment/Reply (w/o sign-up)
Eggie
Feb 2 2008, 09:12 PM
QUOTE(Feelay @ Feb 2 2008, 09:46 PM)  eggie.. Try this one. it should work. (remeber to change the passwor and stuff). CODE <? $con = mysql_connect('localhost','MySQL_Username','MySQL_Password'); if (!$con) { die('Could not connect: ' . mysql_error()); }
mysql_select_db('MySQL_DbName',$con); ?> Should i put that in "config.php" or?and i already posted few times that it does connect to database but something is wrong and it doesn't put information while registering....
Comment/Reply (w/o sign-up)
Feelay
Feb 2 2008, 08:46 PM
eggie.. Try this one. it should work. (remeber to change the passwor and stuff). CODE <? $con = mysql_connect('localhost','MySQL_Username','MySQL_Password'); if (!$con) { die('Could not connect: ' . mysql_error()); }
mysql_select_db('MySQL_DbName',$con); ?>
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : Sql Doesn39t Php Script Code Updates Script- Php Script To Download File From Another Site
- (11)
hi i need a php or java script code for downloading files from other sites to my site for example:
http://download.com/file.zip to http://mysite.com/file.zip thanks...
Password Recovery Script
- (7)
While trying to make password recovery script for "bhupinunder" i run into a problem... i made this:
CODE $dbh = mysql_connect('localhost','jaskaran_gc','gc') or die
("Cannot Connect: " . mysql_error()); mysql_select_db('jaskaran_gc',$dbh); ?> ";?>
if ($recover=answer) print"$email"; ?> and it doesn't print anything...but if i put it
like this CODE $dbh = mysql_connect('localhost','jaskaran_gc','gc') or
die ("Cannot Connect: " . mysql_error()); mysql_select_db('jaskaran_gc',$dbh...
A Simple Checking & Validation PHP Script
- (8)
Hi, there is sometimes that you need to password protect a directory in your site but you dont have
access to a database or you dont need it because only a few users will access this directory, well
the following script i develop will help in this situation. With only 2 files you can implement a
basic security, the first file is a simple txt file where you store your users information and the
second file is the php script. You can name the files whatever you want and can be used in any site
with php support. The users.txt file: In this file simply put one line at the...
PHP Script To Upload A File
- with password-protection. (15)
Problem: Upload a file to the AstaHost account (that I have been granted here) throught the
webpage I would like to know, how should I proceed on this particular problem. I know this has
been done through cPanel, but I want to write a PHP functionality. The cPanel is accessed through
the 2082 port, and most of the places I access internet from does not give me access through that
port. I can access http://www.kmaheshbhat.astahost.com/ but not
http://www.kmaheshbhat.astahost.com/cpanel or http://www.kmaheshbhat.astahost.com:2082/ . I need
to go to one particu...
Tell-a-friend script
- Make a tell-a-friend script with php!! (6)
Hi!! I'll show you how to make a simple tell-a-friend script using php. If you put this on
your site, your visitors will be able to recommend your site to a friend. This can be good promotion
for your site. It's quite easy to set up too. Just copy and past the script below. Put this
where you want the form to appear: friendtell.php " method="get"> Tell a friend:
Put this in the file friendtell.php Your friend has been told! $myname = $from;
$myemail = $from; $contactemail = $to; $message = " Hi!! \nI wanted to tell y...
Php Script Organizer
- (3)
Activation Code
- (7)
Whats the php function that generates a random activation code then sends it to the email the user
used to sign up. Also how do you check if the inputed email has corrected format? meaning its xxx
@something.com ...
Php Random Selector
- whats the code (2)
Is there a PHP script that randomly selects a string from a list? example, the list is: 1-Pie
2-Balls 3-eggs The script would view a random
word from those 3 every time i run it. Also is there a function that gives a random number between
0 and a number i select?...
Need Help With A PHP - MySQL Registration Script
- Wont INSERT into the database (13)
hey well can some one helpme make this code work it won't INSERT INTO THE DATABSE CODE #
register1.php # common include file to MySQL include("DB.PHP"); $Username=$_POST ; $Password=$_POST
; $Name=$_POST ; $Last=$_POST ; $Sex=$_POST ; $Month=$_POST ; $Day=$_POST ; $Year=$_POST ;
$Adresse=$_POST ; $City=$_POST ; $State=$_POST ; $Zipcode=$_POST ; $Country=$_POST ; $Phone=$_POST ;
$Email=$_POST ; $Father_Name=$_POST ; $Mother_Name=$_POST ; $Parent_Phone=$_POST ;
$Parent_Email=$_POST ; $Level=$_POST ; $Academic=$_POST ; $Image_Link=$_POST ; $sql9="INSERT INTO
U...
Myspacetv Download Php Script Help
- (6)
I was trying to make a php script that can view myspace videos with jw flv player and wont to know
how to do so if i put in
"http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=38105626" it show the video
"http://cache01-videos02.myspacecdn.com/11/vid_e382054c036835500bacfef1ebb5157e.flv(its the flv
video file from myspacetv), I cant see the similarity with the links please help, thanks for viewing
this topic /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />...
Dynamic Php Image And Better Php Code Question
- (10)
Im working on a dynamic image, can i put 2 images in same dynamic image, and can i make this code
shorter? if ( $goal == 31 ) { $xp2 = ('14833'); } elseif ( $goal == 32 ) { $xp2 =
('16456'); } elseif ( $goal == 33 ) { $xp2 = ('18247'); } elseif ( $goal == 34 ) {
$xp2 = ('20224'); } elseif ( $goal == 35 ) { $xp2 = ('22406'); } elseif ( $goal ==
36 ) { $xp2 = ('24815'); } elseif ( $goal == 37 ) { $xp2 = ('27473'); } elseif (
$goal == 38 ) { $xp2 = ('30408'); } elseif ( $goal == 39 ) { $xp2 = ('33648')...
Php Login Script
- (0)
login script click the link to get your free php login script installer just follow the
instuctions the exe gives you and it will give you the script just place the code in the sever and
open index.html and follow on from there. what it has: it has reg page, login protection code ect.
it is simple to use and i think quite fun but im BORN TO BE WEIRD,you will need at least one working
mysql data base /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif"
/> hope you enjoy it. iknow i did from the alexmedia crew...
Script Request
- script request (2)
another script request i am looking for a file manger tutorial with edit delete search upload move
copy and a WYSIWYG(What You See Is What You Get) editer like on on freewebs.com and css editor plz
help! i need on badly vmkrightpoint Edit"i keep search google and msn and yahoo i can't find
on!! lol"...
Make A Script Run Even If No User Is Online
- (6)
Hey! Is there any way to make a script run, even if no user is online. Because at the moment, my
scripts run, only when a user is online. And another thing: How can i make the following: (this is
just an example) mysql_query"SELECT maxhp FROM users WHERE username = 'allusers'"; How can I
select all users maxhp, in the same query? Thanks //Feelay...
Writing And Testing My Own Login Script [solved]
- (20)
i have this error QUOTE Warning: session_start() : Cannot send session cache limiter - headers
already sent (output started at /home/eggie/public_html/race.php:2) in
/home/eggie/public_html/race.php on line 5 in every page i have with session start...what's
the problem?? CODE Race include("style.css"); include("config.php"); session_start();
if(!session_is_registered(myusername)){ echo 'Your Session has Expired!'; exit;} //If you
click race... if ($_GET =='race') { $asa=$_POST ; if(!isset($asa)) { echo 'You
didn\'t select an...
Login Script
- (8)
I have another question--- i downloaded script of a game and it worked until my server changed to
newer version of php after which it didn't work... the most probable reason is that globals are
not enabled... now i need someone who can tell me what to put instead of what to make it work...
this is my login.php script CODE if (!$user || !$pass) { include("head.php"); print
"Please fill out all fields."; include("foot.php"); exit; } include("head.php"); $password =
md5($pass); $password2 = md5($password); $password3 = md5($password2); $password4 =...
Free Forum Hosting Type Script Help!
- Free forum hosting type script help!!! (2)
i want to make something like http://invisionfree.com/ that makes an dir with your phpbb 3 forum
in it with an admin CP plz help i really want to make something like it!! i was thinking of coding
my own with file handling but i'm not good at some of it like "when u click submit to register
a forums it will move the phpbb3 file that leads to the users dir then it will rename the dir to
your username so like my.site.com/username it might work" with the admin username and pass and
admin's email it will open the config.php then edit all the data but it will ke...
What Would Make A Good Registration Script?
- (4)
I see newbies all the time looking for either a login script or after a little querying you find
they really would like to have a registration script. The first thing for such a script for a
members area would of course be a form and being kind of old fashioned I still like to format my
forms with a table but I do use inline CSS to make it a little nicer. I never did like forms that
had an asterick * by a field and then a Note: Fields marked with * are required. So what I do
instead is add a background color to those areas and then use a CSS background color statin...
Warning: Mysql_result(): Supplied Argument Is Not A Valid Mysql Result Resource In ...
- This Is for My attack Script. (4)
Hey. I am making a "Version 2.0" For my attack script, but I can't make it work. This is the
error I am gettin: Warning: mysql_result(): supplied argument is not a valid MySQL result resource
in And here is the code: CODE $dbQueryHealth = mysql_query("SELECT temphealth FROM
characters WHERE user =". $_POST .""); $currentHealth = mysql_result($dbQueryHealth, 0);
$dbQueryExp = mysql_query("SELECT exp FROM characters WHERE user = ".$_POST ."");
$currentExp = mysql_result($dbQueryExp, 0); I have checked the PHP Manual,...
Automated Product Suggestion Script
- Compare user lists and suggest related items based on pattern matching (2)
I recently got an idea for a project and one of the features I wanted the project to have was an
automated suggestion service. If anyone has been to Amazon, it would work much like their
recommended product feature. What I want to do is take several users lists of whatever but for this
example, I'll use web links like from the browser history. I would want to suggest links to a
user based on common links in many other users lists. User A: Amazon, Ebay, Excite, Google, Yahoo,
MySpace, Walmart User B: Amazon, Ebay, Google, Yahoo, You Tube, MySpace, CVS User C: Amazo...
What's Wrong With My Php Webpage?
- there may be something wrong in my php code. (2)
This is the first time I use the functions fopen() and preg_replace() . It seems that there's
somthing wrong. Where did I write by mistake? CODE include('data/workinfo/0.php');
$viewwork = substr($work ,0,249); /* HERE CAN'T WORK WELL! */ $newthread =
fopen("http://c8s2007.freetzi.com/bbs/new.php?action=article&digest=0&postdate=0&author=1&fname=0&hi
ts=0&replies=1&pre=6&num=10&length=35&order=1", "rb"); if(!$newthread){ $newthread =
"无法调用信息!"; }else{ $ad = "
"; ...
Php Script Help
- help with scripting of php (1)
Ok first a little back story of what happened and why I am asking for help. I have been playing text
based rpgs and found that I really like them. Well I have also found that most programers don't
want to listen to their clients in the sugestion box and when u make a content sughesstion they get
rude or make fun of your idea. So I decided I would sart my own and make it where the users had say
so in added content. Not saying all sugestions will get added but I will not make fun or get mad at
them. Any who when I bought the script I was under the impression it was fu...
Run A Script When Expires A Session
- (6)
For example, when a user logins to a page -with a login form- and after validating and verifying
it's credentials i store some information related to this user in session variables and a table
with his state -connected- is updated, then i use it in other pages, etc. When this user logouts
-by clicking a logout link- i release -unregister, destroy, etc- all the session variables stored
and the same table is updated with his state -disconnected-. All of this funcionality works very
well, the problem comes when the user do not click on the logout link and the session ...
Something Wrong With This Script?
- Unexpected T_SRING (9)
Here is the code that I have: CODE $con = mysql_connect("localhost","user","password"); if
(!$con) {die(' Could not connect: ' . mysql_error() . ' ');}
mysql_select_db("database", $con); $ip=$_SERVER ; echo "Adding MXP info..."; mysql_query (INSERT
INTO mxp (date, user, victim, turns, side, gold, lost, killed, mxp, points_b, points_a, type, power,
ip) VALUES ('$_POST ','$_POST ','$_POST ','$_POST ','$_POST
','$_POST ','$_POST ','$_POST ','$_POST ','$_POST
','$_POST ...
Automatic/remote Php Script Execution
- (9)
Hi, I was wondering, is it possible to execute a PHP script when a user isn't on the page with
it? Say for example, have it so that a script checks that if a certain time has passed since a user
was last active, it logs them off? So that if they've closed the window, it doesn't keep
them marked as logged in. Also, is there any way, with PHP to alert a user when something changes,
as soon as it happens? Say that if they recieve a new message, a box pops up telling them? You could
do this with Ajax I suppose, but (correct me if I'm wrong) continually runni...
Trainable Anti-spam Filter Script
- Any clues howto write one/get one ? (3)
Hi all, Does anybody have ideas about writing trainable anti-spam mail filters - that you can
add onto any web-mail script ? Looking for something written in perl/php that'll allow me to
just check the checkboxes beside spam mails and click any button (say, "mark as spam") and the
script studies the mail headers and creates its own list of originating spammer domains/ips & blocks
out mails from 'em ? Thanks /smile.gif" style="vertical-align:middle" emoid=":)" border="0"
alt="smile.gif" />...
Please Help (php Join Script)
- (5)
Ok as you all know by now I have been working on a php based game
to help me learn php. It has been going great and it is almost done. I got some very good help on is
sues here and along with sites like php.net. However I am stuck and can not find a solution to a
problem anywere. My Problem: I want users to join but I don't want some charicters to be in
there name (example I dont want Disallowed Charicters: , ', " I would array like: CODE
$string = array( , ', "); This for some reason does not work for. CODE if(strpos($name,
$string)){ //error s...
Login Script
- PHP Help #3 - Need help creating one (5)
It turns out that the authentication script that I copied from
http://www.php-mysql-tutorial.com/user-aut...on/database.php doesn't work even when it is left
unchanged. What a crappy piece of code. Now I am trying to build by own login script from scratch.
I already have a little knowledge on how to do this (connecting, echoing, retrieving) but I need
some more examples and/or tips. I know what I need and maybe this could help you out: Note: Green
items are fixed. No duplicate username in MySQL Database Authorized users only. I have to
authorize each...
How Can I Write PHP Code By This Formmail Html
- (5)
purpose is i want the information in the web page sent into my email. i just know that i need to use
php script to operate this action ,but i have no idea about this php code. so anyone can help me
please... thank you very much. ชื่อ
....................... ....... นามสกุล
....... ชื่อเล่น
วันเกิด 1 2 3 4 5 6 7 8 9 10 11
12 13 14 15 16 ...
Authentication Script
- PHP Help #2 -- I need help tweaking it - it won't work (1)
Okay, my first issue about the MySQL echo problem has been solved, thank you to those who helped.
/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Now I am focusing
on the login portion of my site, and I have this so far: CODE // we must never forget to start
the session session_start(); $errorMessage = ''; if (isset($_POST ) && isset($_POST ))
{ $username = $_POST ; $password = $_POST ; //Connect to database $con =
mysql_connect("localhost","myDatabaseUsername","myDatabasePassword"); if (!$con) { die('Co...
Looking for sql, doesnt, connect, php, script
|
See Also,
*SIMILAR VIDEOS*
Searching Video's for sql, doesnt, connect, php, script
|
advertisement
|
|