[PHP-WIN] php doesnt work in subdirectory
I made directories uder htdocs, and i put my php files. But, Apache cannot parse the php how to change apache config to work with php files under subdirectories Apche 1.3.6 PHP 4.2 as Apache module Thanks .zeus:. http://www.redrival.com/zeussama -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] mysql_fetch_array problem
I try to display mysql database using fetch_array but there seem to problem, i m new with PHP and mysql. I didn't quite sure, what's worng with my codes.i havent include the form yet. the error messages: Warning: mysql_fetch_field(): supplied argument is not a valid MySQL result resource in c:\apache\htdocs\zeus\shoutbox.php on line 17 code in shoutbox.php: "; echo "$name "; echo "$message "; } ?> ==== :.zeus:. http://www.redrival.com/zeussama -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] php and mysql
i write this code, veru simple code about testing inserting into database MySQL. I found a little trouble, wich is the data i inserted in the form doesn't show up in the database, since i still new with PHP, i cannot solve this problem, what's wrong with my code?? thanks "; echo "" ."Insert Title and Descriptiion of a links" ."" ."insert the links of the site" ."" ."Insert the file name of the banner" ."" ."" .""; ?> :.zeus:. http://www.redrival.com/zeussama -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] problem insert data into mysql
I make this script. I have a problem, the data entered in the form wont insert into MYSQL, the database added new row but with blank database. Is there something wrong with the script? because i install phpnuke and i can added new data into mysql. Thanks, i need solve this problem A.S.A.P, with your kind help o PHP-er Thanks.. using PHP 4.2 Apache 1.3 code=== First Name: Last Name: Phone: Mobile: Fax: E-mail: Web: $username="root"; $password=""; $database="belajarPHP"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO contacts VALUES ('','$first','$last','$phone','$mobile','$fax','$email','$web')"; mysql_query($query); mysql_close(); ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] insert into mysql
i write this code, veru simple code about testing inserting into database MySQL. I found a little trouble, wich is the data i inserted in the form doesn't show up in the database, since i still new with PHP, i cannot solve this problem, what's wrong with my code?? thanks "; echo "" ."Insert Title and Descriptiion of a links" ."" ."insert the links of the site" ."" ."Insert the file name of the banner" ."" ."" .""; ?> :.zeus:. http://www.redrival.com/zeussama -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] problem insert data into mysql
I make register golbals on, but it doesn't solve the problems. The wird thing is, i am using php nuke in my localhost, it can enter datas into MySQL, the form and the script it's not diffrent than mine right (phpnuke more complex). The form it self don't have any errors?? and how about the PHP script?? is there any error? I need explanation in english please..please.. because i am still new in php. Dash McElroy wrote: Oh - you might want to check your register_globals item in php.ini and set it to on (look at www.php.net/register_globals) or use $_GET['varname'] for GET, $_POST['varname'] for POST, or $_REQUEST['varname'] for Get/Post/Cookie (works for any of those). -Dash -Original Message- From: zeus [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 8:49 AM To: phpwin Subject: [PHP-WIN] problem insert data into mysql I make this script. I have a problem, the data entered in the form wont insert into MYSQL, the database added new row but with blank database. Is there something wrong with the script? because i install phpnuke and i can added new data into mysql. Thanks, i need solve this problem A.S.A.P, with your kind help o PHP-er Thanks.. using PHP 4.2 Apache 1.3 code=== First Name: Last Name: Phone: Mobile: Fax: E-mail: Web: $username="root"; $password=""; $database="belajarPHP"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query = "INSERT INTO contacts VALUES ('','$first','$last','$phone','$mobile','$fax','$email','$web')"; mysql_query($query); mysql_close(); ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-WIN] parse error
i get parse error with this code, what's wrong with the code? i think i have give the "else" statement in ther right way. help,neet it so bad. Thanks === / //configure /// / require("config.php"); / //connect ke mysql/// / mysql_connect($db_host,$db_user,$db_pass) or die ("cannot connect"); @mysql_select_db($db_base) or die ("cannot select db"); if($submit)//kalo tombol submit belum di tekan { $result=mysql_query("SELECT * from balon_chara"); while($r=mysql_fetch_array($result))//loop { $chara_id=$r["chara_id"]; $judul=$r["judul"]; ?> else($submit) { $sql = "DELETE FROM balon_chara WHERE chara_id='$chara_id'"; $result = mysql_query($sql); echo "recold deleted"; } ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] parse error
Nope! i try that one too, but the parse error thing still exist Howard, Robert P wrote: change your else($submit) statement to else -Original Message- From: zeus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 20 November 2002 4:25 AM To: phpwin Subject: [PHP-WIN] parse error i get parse error with this code, what's wrong with the code? i think i have give the "else" statement in ther right way. help,neet it so bad. Thanks === / //configure /// / require("config.php"); / //connect ke mysql/// / mysql_connect($db_host,$db_user,$db_pass) or die ("cannot connect"); @mysql_select_db($db_base) or die ("cannot select db"); if($submit)//kalo tombol submit belum di tekan { $result=mysql_query("SELECT * from balon_chara"); while($r=mysql_fetch_array($result))//loop { $chara_id=$r["chara_id"]; $judul=$r["judul"]; ?> else($submit) { $sql = "DELETE FROM balon_chara WHERE chara_id='$chara_id'"; $result = mysql_query($sql); echo "recold deleted"; } ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-WIN] parse error
i got the error in these line.. ..code before... else($submit) ..after . Maybe its vaery vary for some poeple wit diffrent setup of aplication, or anything to do with my code, i will look up my code again...maybe the erro has gone away ^^; Dash McElroy wrote: What line number are you getting the parse error at? It's amazing what that can tell you. -Dash On Tue, 19 Nov 2002, zeus wrote: Nope! i try that one too, but the parse error thing still exist Howard, Robert P wrote: change your else($submit) statement to else -Original Message- From: zeus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 20 November 2002 4:25 AM To: phpwin Subject: [PHP-WIN] parse error i get parse error with this code, what's wrong with the code? i think i have give the "else" statement in ther right way. help,neet it so bad. Thanks === / //configure /// / require("config.php"); / //connect ke mysql/// / mysql_connect($db_host,$db_user,$db_pass) or die ("cannot connect"); @mysql_select_db($db_base) or die ("cannot select db"); if($submit)//kalo tombol submit belum di tekan { $result=mysql_query("SELECT * from balon_chara"); while($r=mysql_fetch_array($result))//loop { $chara_id=$r["chara_id"]; $judul=$r["judul"]; ?> else($submit) { $sql = "DELETE FROM balon_chara WHERE chara_id='$chara_id'"; $result = mysql_query($sql); echo "recold deleted"; } ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php