[PHP-DB] Re: pg_query creates wrong query
Sascha Alexander Jopen wrote: > Hi there, > > I'm new to PHP, especially to the db-functions. > I've got a problem querying my PostgreSQL server using pg_query. > The Tables i'm working on contain colume names with uppercase letters. > Working on those tables directly with psql, the client program delivered > with postgresql, works like expected. Its case-sensitive, so you have to > specify the table names with the correct case of the letters. But pg_quer > seems to convert all queries into lowercase. This is normal. PostgreSQL does not distingish case and stores most names as lowercase and convert names to lowerc case. You can keep case also. Read PostgreSQL manual for detials. > > A query like: INSERT INTO users (UsrLoginName, UsrPassword) VALUES ... > results in an errormessage like: PHP Warning: pg_query() query failed: > ERROR: Relation 'users' does not have attribute 'usrloginname' ... > > What did i do wrong? Or is it a problem with the postgresql db-package of > PHP? Because there is no 'usrloginname'? > > I think, if the backend is case-sensitive, PHP's functions should be > case-sensitiv, too! I like case sensitive language, but PHP is not. You have to live with it. > Please don't tell me to convert all tables/colums to lowercase! Read PostgreSQL manual, then you should be able to find info needed. test=# create table ttt ("ThisIsNumber" int); CREATE test=# \d ttt Table "ttt" Column| Type | Modifiers --+-+--- ThisIsNumber | integer | test=# create table (ThisIsNumber int); CREATE test=# \d Table "" Column| Type | Modifiers --+-+--- thisisnumber | integer | test=# -- Yasuo Ohgaki -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: pg_fetch_result returns something other than boolean???
Matthew Newby wrote: > Many thanks for the info. I "discovered" that test yesterday. However, if > that is indeed the way I should test it, then something probably needs to > change in the PHP docs. On the page > http://www.php.net/manual/en/function.pg-fetch-result.php it explicitly > states: I didn't notice this documentation error. (I suppose it was correct when it is written, but psql return 't' or 'f' now) Thanks. It is fixed. -- Yasuo Ohgaki -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: pg_query creates wrong query
Thank you. I forgot to use the "'s to force mixed-case. Know it works fine. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] header
hi, I am new on php Just want to know I am using mysql and php on a page .. and after the page do what it should do , I want it to go to another page..so I though about using header ("Location:...") but it is giving error message iii.. can anybody help me?... thanks a lot meltem demirkus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] header
Hi Meltem, On Thu, 5 Sep 2002, Meltem Demirkus wrote: > hi, > I am new on php Just want to know I am using mysql and php on a page .. > and after the page do what it should do , I want it to go to another > page..so I though about using header ("Location:...") but it is giving > error message iii.. Be sure that your code produces no output before header line. HTH -- Devrim GUNDUZ [EMAIL PROTECTED] Tel : (312) 295 9318 [EMAIL PROTECTED] Faks : (312) 295 9494 Web : http://devrim.oper.metu.edu.tr - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] header
I tried but it gave this error Warning: Cannot add header information - headers already sent by (output started at C:\FoxServ\www\debugger\project_module\start_html.php:5) in C:\FoxServ\www\debugger\project_module\project_add_.php on line 11 start_html.php file includes: There is no output but it is sayin there is an output?... thanks alot .. meltem demirkus - Original Message - From: "Devrim GUNDUZ" <[EMAIL PROTECTED]> To: "Meltem Demirkus" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, September 05, 2002 2:38 PM Subject: Re: [PHP-DB] header > > Hi Meltem, > > On Thu, 5 Sep 2002, Meltem Demirkus wrote: > > > hi, > > I am new on php Just want to know I am using mysql and php on a page .. > > and after the page do what it should do , I want it to go to another > > page..so I though about using header ("Location:...") but it is giving > > error message iii.. > > Be sure that your code produces no output before header line. > > HTH > > -- > > Devrim GUNDUZ > > [EMAIL PROTECTED] Tel : (312) 295 9318 > [EMAIL PROTECTED] Faks : (312) 295 9494 > > Web : http://devrim.oper.metu.edu.tr > - > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] header
Hi, On Thu, 5 Sep 2002, Meltem Demirkus wrote: > > Warning: Cannot add header information - headers already sent by (output > started at C:\FoxServ\www\debugger\project_module\start_html.php:5) in > C:\FoxServ\www\debugger\project_module\project_add_.php on line 11 > > start_html.php file includes: > > > > > > > > > Check the error: "Warning: Cannot add header information - headers already sent by (output started at C:\FoxServ\www\debugger\project_module\start_html.php:5) "; let's check line 5: http://devrim.oper.metu.edu.tr - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] header
That's wrong!!! the output starts erlier everything and i mean realy everything outside is output!!! remember that it's php native behavior to send stuff outside to the client with the standard header for plain text greet Martin - Original Message - From: "Devrim GUNDUZ" <[EMAIL PROTECTED]> To: "Meltem Demirkus" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, September 05, 2002 2:08 PM Subject: Re: [PHP-DB] header > > Hi, > > On Thu, 5 Sep 2002, Meltem Demirkus wrote: > > > > Warning: Cannot add header information - headers already sent by (output > > started at C:\FoxServ\www\debugger\project_module\start_html.php:5) in > > C:\FoxServ\www\debugger\project_module\project_add_.php on line 11 > > > > start_html.php file includes: > > > > > > > > > > > > > > > > > > > > Check the error: "Warning: Cannot add header information - headers already > sent by (output started at > C:\FoxServ\www\debugger\project_module\start_html.php:5) "; > > let's check line 5: > > > this is an output. > > Best regards. > -- > > Devrim GUNDUZ > > [EMAIL PROTECTED] Tel : (312) 295 9318 > [EMAIL PROTECTED] Faks : (312) 295 9494 > > Web : http://devrim.oper.metu.edu.tr > - > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Form question.......
That's a toughie. I've done it once where I used a small popup window (opening it with JavaScript) to go to the server, perform the query to retrieve the information, stuff it into a JavaScript array and then return the array to the calling page and close the window. It works but the user will see a small window pop-up. Other than that, it is possible to use a Java Applet to do it as well. HTH, =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Rodrigo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 7:30 PM To: PHP Subject: [PHP-DB] Form question... Hi, i have a question, it may be dumb, but i´m very new with php and mysql, i need help. how can i check a form when i change from one field to another I want make a condition.if the number i typed is allready in the database, not just when i finish filling out the hole form...clickin in submit and then make the conditionshelp heheheh Rodrigo Corrêa [EMAIL PROTECTED] Obs: Sorry about the english, i´m from Brazil...so my english isn´t good -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] data by link
Hi, Is there any way to carry a data by using linking ...I mean can I put a data on ?...If so how ?.. thanks meltem demirkus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Form question.......
Another option would be to break your one form into two separate forms where the first form asks for this number, checks the database, then transfers to user to the next logical page (rest of form or re-enter data) based on the results of that query to the db. I'm not saying it's anywhere near the BEST solution especially of traffic will be heavy, but it's an option. I've seen it used elsewhere (www.2test.com, for example) with varying degrees of success. Basically, if you only do it to your user once, maybe twice, you can get away with it. Any more and you stand the chance of losing your user - especially if the connection speed is slow (56k or slower). Your basic challenge here is that you need to communicate with the db to do the checking you want and that takes a round trip from the browser to the server and back. Basic web-based hurdle, but you have to design to your environment. Then again, maybe somebody else out there HAS already solved this...? Good luck. -Original Message- From: Cal Evans [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 8:58 AM To: Rodrigo; PHP Subject: RE: [PHP-DB] Form question... That's a toughie. I've done it once where I used a small popup window (opening it with JavaScript) to go to the server, perform the query to retrieve the information, stuff it into a JavaScript array and then return the array to the calling page and close the window. It works but the user will see a small window pop-up. Other than that, it is possible to use a Java Applet to do it as well. HTH, =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Rodrigo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 04, 2002 7:30 PM To: PHP Subject: [PHP-DB] Form question... Hi, i have a question, it may be dumb, but i´m very new with php and mysql, i need help. how can i check a form when i change from one field to another I want make a condition.if the number i typed is allready in the database, not just when i finish filling out the hole form...clickin in submit and then make the conditionshelp heheheh Rodrigo Corrêa [EMAIL PROTECTED] Obs: Sorry about the english, i´m from Brazil...so my english isn´t good -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] data by link
You have to append the data to the href then access the variable and its value on a resulting page. In general, it would look like this (I'm sure the list will point out any syntax errors I have made): To send the data to another page: Click here To use the variable on another page (page.php): $newvar = $_GET["variable1"]; All of this is explained very well in the PHP documentation. -Original Message- From: Meltem Demirkus [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 9:10 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] data by link Hi, Is there any way to carry a data by using linking ...I mean can I put a data on ?...If so how ?.. thanks meltem demirkus -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Form question.......
Another way is to refresh the page everytime the user has filled a field in and moves to another: function submit_field( i ) { document.myform.field_to_check.value = "field" + i ; document.myform.submit() ; } The idea is that the "onchange" event is triggered when the user has input something and moves her mouse cursor somewhere else in the form. The javascript passes to the server the name of the field that is to be checked server-side. Supposes you have a consistent naming convention for fields, but you can easily adapt the js function ... Still, Rodrigo's idea of server-side checking every field one at a time does not seem much user-friendly to me. Better normally validate all POST-ed fields server-side upon form submit. - Original Message - From: "Cal Evans" <[EMAIL PROTECTED]> To: "Rodrigo" <[EMAIL PROTECTED]>; "PHP" <[EMAIL PROTECTED]> Sent: Thursday, September 05, 2002 2:58 PM Subject: RE: [PHP-DB] Form question... > That's a toughie. I've done it once where I used a small popup window > (opening it with JavaScript) to go to the server, perform the query to > retrieve the information, stuff it into a JavaScript array and then return > the array to the calling page and close the window. > > It works but the user will see a small window pop-up. > > Other than that, it is possible to use a Java Applet to do it as well. > > HTH, > =C= > > * > * Cal Evans > * The Virtual CIO > * http://www.calevans.com > * > > > -Original Message- > From: Rodrigo [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 04, 2002 7:30 PM > To: PHP > Subject: [PHP-DB] Form question... > > > Hi, i have a question, it may be dumb, but i´m very new with php and mysql, > i need help. > > how can i check a form when i change from one field to another I want > make a condition.if the number i typed is allready in the database, not > just when i finish filling out the hole form...clickin in submit and then > make the conditionshelp heheheh > > > > -- -- > > Rodrigo Corrêa > [EMAIL PROTECTED] > > > > Obs: Sorry about the english, i´m from Brazil...so my english isn´t > good > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL order by in greek
Hi you have to restart your mysqld server with --default-character-set=greek option. You can either do this by explicitly giving it in the command line when restarting your mysqld, or you can add that line to your global my.cnf file. See: http://www.mysql.com/doc/en/Command-line_options.html and http://www.mysql.com/doc/en/Option_files.html Hope this helps Gurhan On Wed, 2002-09-04 at 03:29, Achilleas Maroulis wrote: > Hi, I have a MySQL problem but due to small problem of my email I can't subscribe to >a MySQL list so I wonder if someone from you can answer (actually I'm sure about >it...) > My problem is that I have a query that fetches all data from a table in alphabetical >order using the "...order by col_name asc..." command. The problem is that the data >in this column is not in english but in greek (as I am Greek!!) and they are not >coming in the right order. > I don't know where to start searching for the solution... > Is it the operating sysytem (SuSE LINUX 8.0 in greek) or the MySQL installation >(v3.23 which came with the SuSE installation)? > > Thanx in advance... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Table formatting a link from a mysql query result
All, How can I display the results of a table so that the first field (column) is a link to another page that shows the details of that row? Issue #1, I have to wrap the cell contents in an http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Table formatting a link from a mysql query result
$variable_to_be_passed = 'some value'; echo "I am a link"; I think this should do it, not quite sure what you mean by wrappinga table cell in a anchor tag? Of course if you need to use the results of a database, this can be done too with the same method. HTH -Brad Aaron Merrick wrote: > All, > > How can I display the results of a table so that the first field (column) is > a link to another page that shows the details of that row? Issue #1, I have > to wrap the cell contents in an variable to the referenced page when the link is clicked. Anyone know of > any good examples of this? > > Thanks, > Aaron > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] database result: tables with 2 coloumns
Hi.. I'm creating a database result in a table, but I need to put it into 2 columns of looping row like this: |name1|name2| |name3|name4| |name5|name6| |name7|name8| |name9|name10 | etc... can anyone help me please... iman -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] database result: tables with 2 coloumns
How's this? (MYSQL example) $query = "select NAME from table_name"; $result = mysql_query($query) or die("Invalid Query: $query"); $num_rows = mysql_num_rows($result); $counter=1; echo ""; //start of table for ($i=0;$i<$num_rows; $i++) //loop through the number of records { $row = mysql_fetch_array($result); //Get associate row echo "$row[0]"; //Print out the NAME if ($counter == 2) { echo ""; //Make a new Table row $counter=1; //Reset Counter } else { $counter++; //Just increment the counter } } echo ""; mysql_free_result($result); HTH -Brad [EMAIL PROTECTED] wrote: > Hi.. > > I'm creating a database result in a table, but I need to put it into 2 > columns of looping row like this: > > |name1|name2| > |name3|name4| > |name5|name6| > |name7|name8| > |name9|name10 | > etc... > > can anyone help me please... > > iman > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Table formatting a link from a mysql query result
Brad, Thanks a million! That does the trick. Aaron On 9/5/02 3:38 PM, "Brad Bonkoski" <[EMAIL PROTECTED]> wrote: > $variable_to_be_passed = 'some value'; > echo "I am a > link"; > > I think this should do it, not quite sure what you mean by wrappinga > table cell in a anchor tag? Of course if you need to use the results of > a database, this can be done too with the same method. > > HTH > -Brad > > Aaron Merrick wrote: >> All, >> >> How can I display the results of a table so that the first field (column) is >> a link to another page that shows the details of that row? Issue #1, I have >> to wrap the cell contents in an > variable to the referenced page when the link is clicked. Anyone know of >> any good examples of this? >> >> Thanks, >> Aaron >> >> > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: mysql_connect
On 3 Sep 2002 at 23:00, Bryan McLemore wrote: > - Original Message - > From: "David Robley" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 03, 2002 9:31 PM > Subject: [PHP-DB] Re: mysql_connect > > > > In article <000c01c253b2$506d7530$0101a8c0@fwcmain>, > > [EMAIL PROTECTED] says... > > > I'm trying to connect using the sample code in the php documentation. > IT however dies every time. If someone could please help me? Thanks. > > > > > Bryan > > > Can you show the code you are using, and any error > messages you get? > > -- > David Robley > Temporary Kiwi! > > Quod subigo > farinam > > -- > PHP Database Mailing List (http://www.php.net/) > To > unsubscribe, visit: http://www.php.net/unsub.php > Love the formatting by your mail pkg - OE of course :-) > The code is > > $link = mysql_connect("localhost:3306", "UserName", "Password") > or die("Could not connect"); > > Thanks, > Bryan McLemore May I suggest you keep the discussion on the mailing list - a) you have the entire list's expertise to draw on, b) the solution is shared with others who may benefit and c) you may get a quicker answer. Now, you haven't said so, but I assume you are getting 'Could not connect'? So, points to check: 1) mysql is running, and on port 3306; note that you don't need to specify the port usually 2) the username and password are correct - try the command line version to check that the user/pass are accepted (assuming you have command line access) 3) remove the 'or die' construct and see if you get an error message -- David Robley Temporary Kiwi! Quod subigo farinam "My grape juice has fermented," Tom whined. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP htaccess username grab
Hello, If I were to use a plain old htaccess file with a htpasswd file for user authentication, rather than php files, could PHP somehow later retrieve the username used through some system or browser variables? I would assume that the browser keeps the username and password as long as the session is active... Any help or advice would be greatly appreciated. Keith [EMAIL PROTECTED]
Re: [PHP-DB] PHP htaccess username grab
$REMOTE_USER On Thu, 5 Sep 2002, Keith Spiller wrote: > Hello, > > If I were to use a plain old htaccess file with a htpasswd file for user >authentication, rather than php files, could PHP somehow later retrieve the username >used through some system or browser variables? > > I would assume that the browser keeps the username and password as long as the >session is active... > > Any help or advice would be greatly appreciated. > > Keith > [EMAIL PROTECTED] > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: mysql_connect
I might have missed the first of your posts and may be repeating someone else's suggestions but have you checked the hosts that the mysql user account that your are using can connect from the right areas. In the user table of the mysql database insure that the user account you are using has the proper rights to connect from 'localhost' and depending on your setup, that user may need access to connect from 'localhost.localdomain'. You could test if this may be the problem by giving that user account the value of '%' in the host column which would allow the user to connect from all hosts but do not leave it this way as you will be wide open for intrusion. BJH -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 8:27 PM To: Bryan McLemore; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: mysql_connect On 3 Sep 2002 at 23:00, Bryan McLemore wrote: > - Original Message - > From: "David Robley" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 03, 2002 9:31 PM > Subject: [PHP-DB] Re: mysql_connect > > > > In article <000c01c253b2$506d7530$0101a8c0@fwcmain>, > > [EMAIL PROTECTED] says... > > > I'm trying to connect using the sample code in the php > > > documentation. > IT however dies every time. If someone could please help me? Thanks. > > > > > > Bryan > > > Can you show the code you are using, and any error > messages you get? > > -- > David Robley > Temporary Kiwi! > > Quod > subigo farinam > > -- > PHP Database Mailing List > (http://www.php.net/) > To unsubscribe, visit: > http://www.php.net/unsub.php > Love the formatting by your mail pkg - OE of course :-) > The code is > > $link = mysql_connect("localhost:3306", "UserName", "Password") > or die("Could not connect"); > > Thanks, > Bryan McLemore May I suggest you keep the discussion on the mailing list - a) you have the entire list's expertise to draw on, b) the solution is shared with others who may benefit and c) you may get a quicker answer. Now, you haven't said so, but I assume you are getting 'Could not connect'? So, points to check: 1) mysql is running, and on port 3306; note that you don't need to specify the port usually 2) the username and password are correct - try the command line version to check that the user/pass are accepted (assuming you have command line access) 3) remove the 'or die' construct and see if you get an error message -- David Robley Temporary Kiwi! Quod subigo farinam "My grape juice has fermented," Tom whined. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
FW: [PHP-DB] Re: mysql_connect
Sorry, I think I orignially sent reply to wrong poster. That was confusing I might have missed the first of your posts and may be repeating someone else's suggestions but have you checked the hosts that the mysql user account that your are using can connect from the right areas. In the user table of the mysql database insure that the user account you are using has the proper rights to connect from 'localhost' and depending on your setup, that user may need access to connect from 'localhost.localdomain'. You could test if this may be the problem by giving that user account the value of '%' in the host column which would allow the user to connect from all hosts but do not leave it this way as you will be wide open for intrusion. BJH -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 05, 2002 8:27 PM To: Bryan McLemore; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: mysql_connect On 3 Sep 2002 at 23:00, Bryan McLemore wrote: > - Original Message - > From: "David Robley" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, September 03, 2002 9:31 PM > Subject: [PHP-DB] Re: mysql_connect > > > > In article <000c01c253b2$506d7530$0101a8c0@fwcmain>, > > [EMAIL PROTECTED] says... > > > I'm trying to connect using the sample code in the php > > > documentation. > IT however dies every time. If someone could please help me? Thanks. > > > > > > Bryan > > > Can you show the code you are using, and any error > messages you get? > > -- > David Robley > Temporary Kiwi! > > Quod > subigo farinam > > -- > PHP Database Mailing List > (http://www.php.net/) > To unsubscribe, visit: > http://www.php.net/unsub.php > Love the formatting by your mail pkg - OE of course :-) > The code is > > $link = mysql_connect("localhost:3306", "UserName", "Password") > or die("Could not connect"); > > Thanks, > Bryan McLemore May I suggest you keep the discussion on the mailing list - a) you have the entire list's expertise to draw on, b) the solution is shared with others who may benefit and c) you may get a quicker answer. Now, you haven't said so, but I assume you are getting 'Could not connect'? So, points to check: 1) mysql is running, and on port 3306; note that you don't need to specify the port usually 2) the username and password are correct - try the command line version to check that the user/pass are accepted (assuming you have command line access) 3) remove the 'or die' construct and see if you get an error message -- David Robley Temporary Kiwi! Quod subigo farinam "My grape juice has fermented," Tom whined. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: mysql_connect
Sorry about the private email didn't mean too. The email header shows you as it being from you and when I hit "reply" it defaults to go to you. Sorry bout that. Well on the goodside I got it fixed. Thanks for the feedback. The thing that got me was not having "root" has the user. Well thanks. Bryan - Original Message - From: "David Robley" <[EMAIL PROTECTED]> To: "Bryan McLemore" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, September 05, 2002 8:26 PM Subject: Re: [PHP-DB] Re: mysql_connect > On 3 Sep 2002 at 23:00, Bryan McLemore wrote: > > > - Original Message - > > From: "David Robley" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, September 03, 2002 9:31 PM > > Subject: [PHP-DB] Re: mysql_connect > > > > > > > In article <000c01c253b2$506d7530$0101a8c0@fwcmain>, > > > [EMAIL PROTECTED] says... > > > > I'm trying to connect using the sample code in the php documentation. > > IT however dies every time. If someone could please help me? Thanks. > > > > > > Bryan > > > Can you show the code you are using, and any error > > messages you get? > > -- > David Robley > Temporary Kiwi! > > Quod subigo > > farinam > > -- > PHP Database Mailing List (http://www.php.net/) > To > > unsubscribe, visit: http://www.php.net/unsub.php > > > Love the formatting by your mail pkg - OE of course :-) > > > The code is > > > > $link = mysql_connect("localhost:3306", "UserName", "Password") > > or die("Could not connect"); > > > > Thanks, > > Bryan McLemore > > May I suggest you keep the discussion on the mailing list - a) you have > the entire list's expertise to draw on, b) the solution is shared with > others who may benefit and c) you may get a quicker answer. > > Now, you haven't said so, but I assume you are getting 'Could not > connect'? > > So, points to check: > > 1) mysql is running, and on port 3306; note that you don't need to > specify the port usually > 2) the username and password are correct - try the command line version > to check that the user/pass are accepted (assuming you have command line > access) > 3) remove the 'or die' construct and see if you get an error message > > > -- > David Robley > Temporary Kiwi! > Quod subigo farinam > > "My grape juice has fermented," Tom whined. > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] button control
Hi , Does anybody know how php understand which button is pushed on a page ..? Is there anyway to do different applications according to the different 2 button on a page?.. thanks... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] button control
PHP is a server-side scripting language, there is no way for it to know what is going on client window, that's a job for Javascript. But if you are using them in a form you can give them name/value to use them as form variables which can be used in the form action. This is a general PHP question, not DB related, forward this kind of issues to php-general mailing list. Gurhan On Fri, 2002-09-06 at 02:52, Meltem Demirkus wrote: > Hi , > Does anybody know how php understand which button is pushed on a page ..? > Is there anyway to do different applications according to the different 2 > button on a page?.. > > thanks... > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php