RE: [PHP-DB] Re: cookie trouble
Try something like $_COOKIE_VARS[user] ... or $COOKIE_VARS[user] ... dunno exactly ... -Original Message- From: Seabird [mailto:jacco;vliegt.nl] Sent: 01 November 2002 10:04 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: cookie trouble Now, I have set the cookie, but when I run this code I always get the bye output. Why?? ?php if (isset($user)) print 'hello'; else print 'bye'; ? -- http://seabird.jmtech.ca Attitude is Everything! But Remember, Attitudes are Contagious! Is Yours worth Catching Aaron Wolski [EMAIL PROTECTED] wrote in message news:000201c2811e$a787ebe0$0701a8c0;aaron... You cannot reverse the encryption of an md5 hash. Nor should you want to. You don't want to know their password which is why you encrypt it. When you seyup an account you convert the password to an md5 has(I assume you have done so). When they log back in.. You convert the password to an md5 hash and compare that value against the stored md5 password. If a match - log the user in. If not - kick an error page. Aaron -Original Message- From: Seabird [mailto:jacco;vliegt.nl] Sent: Thursday, October 31, 2002 9:49 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: cookie trouble I got this fixed, but how do I reverse a md5 encryption? this way I can log people in again. Jacco -- http://seabird.jmtech.ca Attitude is Everything! But Remember, Attitudes are Contagious! Is Yours worth Catching Seabird [EMAIL PROTECTED] wrote in message news:20021031165410.94762.qmail;pb1.pair.com... Hi everyone, I'm having some trouble configuring a cookie (first time doing this): I have a login-script and this sets a session cookie. What I really want is to pass a cookie so that returning-people don't have to log in every time, but I'm not sure how to do what part is passing on the cookie (I think $_HTTP_SESSION_VARS=['PHP_SELF'] ) How can I change this to a cookie that stores username and password for a time set by me (infinite). Here is my loginscript: ?php if(isset($_POST['submit'])) { // if form has been submitted /* check they filled in what they were supposed to and authenticate */ if(!$_POST['uname'] | !$_POST['passwd']) { print 'form action=index.php method=post div align=left input class=test name=uname type=text size=8 maxlength=8 input class=test type=password size=8 maxlength=8 name=passwd input name=submit type=submit value=Login br span class=welcomeplease fill in the required fields./span/div /form '; } // authenticate. if(!get_magic_quotes_gpc()) { $_POST['uname'] = addslashes($_POST['uname']); } $check = $db_object-query(SELECT username, password FROM users WHERE username = '.$_POST['uname'].'); if(DB::isError($check)) { print 'form action=index.php method=post div align=left input class=test name=uname type=text size=8 maxlength=8 input class=test type=password size=8 maxlength=8 name=passwd input name=submit type=submit value=Login br span class=welcomeusername doesn\'t exist./span a class=header href=javascript:loadPage(\'mainlayer\',null,\'login/signup.php\')si gn up here/a/div /form '; } $info = $check-fetchRow(); // check passwords match $_POST['passwd'] = stripslashes($_POST['passwd']); $info['password'] = stripslashes($info['password']); $_POST['passwd'] = md5($_POST['passwd']); if($_POST['passwd'] != $info['password']) { print 'form action=index.php method=post div align=left input class=test name=uname type=text size=8 maxlength=8 input class=test type=password size=8 maxlength=8 name=passwd input name=submit type=submit value=Login br span class=welcomewrong password, try again/span/div /form '; } // if we get here username and password are correct, register session variables and set // last login time. $date = date('m d, Y'); $update_login = $db_object-query(UPDATE users SET last_login = '$date' WHERE username = '.$_POST['uname'].'); $_POST['uname'] = stripslashes($_POST['uname']); $_SESSION['username'] = $_POST['uname']; $_SESSION['password'] = $_POST['passwd']; $db_object-disconnect(); ? span class=welcomeWelcome a class=header href=javascript:loadPage('mainlayer',null,'users/edit.php?use r=?=$_SESSION ['username']??PHP print PHPSESSID=.session_id(); ?')font color=white?=$_SESSION['username']?/font/abra class=header href=login/logout.phpLogout/a /span ?php } else { // if form hasn't been submitted ? form action=?=$HTTP_SESSION_VARS['PHP_SELF']? method=post div align=left input
RE: [PHP-DB] Add column to a table
For mysql: Alter table tablename add column column-name columntype; Regards, Marcel -Original Message- From: Shaun Thornburgh [mailto:shaun;mania.plus.com] Sent: 31 October 2002 13:39 To: [EMAIL PROTECTED] Subject: [PHP-DB] Add column to a table Hi, Please could someone tell me what the syntax is to add a column to a table? Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] a where clause question
Hi Alex, I believe your database-design is not good ... think about a re-design or send us some info about your tables. Maybe we find a better solution... Regards, Marcel -Original Message- From: Alex Shi [mailto:[EMAIL PROTECTED]] Sent: 06 October 2002 22:43 To: [EMAIL PROTECTED] Subject: [PHP-DB] a where clause question Hi, I need a where clause in following situation: Say I want to query two tables: A and B. In table A there is field Afn, while in table B there ere 3 fields: Bfn1, Bfn2 and Bfn3. I want to compose a query, in which the where clause can do this: if A.Afn=1, then check Bfn1, if A.Afn=2, then check Bfn2, if A.Afn=3, then check Bfn3. So how I compose a where clause to do this? Thanks in advance! Alex Shi -- --- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] PHP, Sybase, Stored Procedures
Hello world, I´ve got a problem concerning PHP, Sybase and Stored Procedures I want to execute a stored proc from sybase called sp_helprotect ... this proc is directly from sybase so I don´t want to change it ... When I look at the proc I see that nocount is set on... This means that a query won´t be able to determine how much rows were affected/returned. I cannot read the resultset from this query!!! (within PHP) I created an exact copy of sp_helprotect without set nocount on and then it worked fine! (resultset could be read) Is there a workaround or does anyone have a solution to this problem ??? Looking forward to all answers ... Regards, Marcel -- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Seperate Tables for Same Data?
Which database do you use ? I don´t know mySql ... but I know Sybase very well and there you have something called Triggers ... [Cite SybaseDoc] A trigger is a stored procedure that goes into effect when you insert, delete, or update data in a table [/CITE] You could say for example Create trigger for blahblah on insert as begin take the inserted recordset and put it in another table ... end Cheers, Marcel -Original Message- From: jv [SMTP:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 17:44 To: [EMAIL PROTECTED] Subject: [PHP-DB] Seperate Tables for Same Data? Greetings, I am setting up two seperate tables that will hold identically INSERTed data. The reason for this is that one table will hold data that will expire by timestamp daily and the other will hold the very same data for later manipulation. Is sending identical data like this to two seperate tables a good practise or is there a better way? Thanks, James -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Accessing fields with the same name in MySQL
You have two times the field id Look at your query ... especially the Where-Clause .. You only want to show Recordsets where id = id ... = In both columns is the same value ... -Original Message- From: Trevor Lanyon [SMTP:[EMAIL PROTECTED]] Sent: Monday, August 27, 2001 20:13 To: [EMAIL PROTECTED] Subject: [PHP-DB] Accessing fields with the same name in MySQL tbl_job --- id name_id job tbl_name id first last SQL --- select * from tbl_name, tbl_job where tbl_name.id = tbl_job.name_id; I use mysql_fetch_object to retrieve a row from the above result set. I have two objects, objName and objJob. The constructor for both objects accept a result object. How do I reference what table the id column came from. These objects are generic so aliasing is not an option. So how to I differentiate what table each column comes from? Trevor Lanyon ClearOption Technologies 204.889.1906 - Office 204.831.7243 - Fax 204.229.2625 - Cellular http://www.clearoption.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Resource ID
I don´t know what your class does ... but normally queries work like this: open database $qresult = query(select blah,$link_id); // Now, in $qresult is a number with which you can go through your resultset ... // For Example: while ( $Recordset = ezi_fetch_array($qresult) ) { print $Recordset[ColumnName]; } close database ... Hope I am right (because I don´t know your class ...) -Original Message- From: Scott Mebberson [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, August 28, 2001 07:06 To: [EMAIL PROTECTED] Subject: [PHP-DB] Resource ID Hi Guys, I am querying my MySQL database with this sql: $q-ezi_query($db, SELECT id FROM words WHERE word='$word'); ezi_query() is just a class - an database layer so the databases can be swapped. Then I check the result to see if it worked. But all I get in the result is Resource id #5 - this number can very sometimes as I am doing these query in a loop and it just counts up. to 8. But I am querying for $word which is a string which is not in that table in the database? Does anybody now what this means? Thanks. Scott -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Slightly OT - maybe just SQL not php
On Sybase the following script: create table #temp_table ( a varchar(10), b numeric identity ) insert into #temp_table (a) values (1234) insert into #temp_table (a) values (234) insert into #temp_table (a) values (134) insert into #temp_table (a) values (124) insert into #temp_table (a) values (22434) insert into #temp_table (a) values (1245234) insert into #temp_table (a) values (251234) insert into #temp_table (a) values (3451234) insert into #temp_table (a) values (1634234) select * from #temp_table update #temp_table set a = N + a select * from #temp_table go Produces the following output: a b -- - 1234 1 2342 1343 1244 22434 5 12452346 251234 7 34512348 16342349 (9 rows affected) (9 rows affected) a b -- - N1234 1 N234 2 N134 3 N124 4 N22434 5 N1245234 6 N2512347 N3451234 8 N1634234 9 (9 rows affected) -Original Message- From: George Pitcher [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 09:31 To: [EMAIL PROTECTED] Subject: [PHP-DB] Slightly OT - maybe just SQL not php Hi all, I have a MySQL table with approx 350,000 records (US aviation register) and the way the FAA produce it is without the 'N' prefix which I wish to add. Can anyone point me to a sql command which will upodate the N-Number field to 'N' + N-Number field? George, Edinburgh _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] getting ID
Is there a similar function for a Sybase - Database ? -Original Message- From: Ian Grant [SMTP:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 12:20 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] getting ID mysql_insert_id([resource link_identifier]) returns the value of the auto_increment field for the previous INSERT query. It will return 0 if there is not an auto_increment field. If the link_identifier is not specified, the last opened connection is used. So, use $id = mysql_insert_id(); directly after your $result = mysql_query($query); operation (where $query is an INSERT query) to pull the id value you have just auto inserted back out. Ian. Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php Crosswalkcentral [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried this and it gave me an error. Will this $id = mysql_insert_id(); allow me to pull out the id? -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! Cynic [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 19:19 8/19/2001, CrossWalkCentral wrote the following: -- I have a script where I submit user data to the database in my script I need to get the id # how can I do this w/o creating a query that does the following considering that user could have 10 other entires. mysql_query(insert into ...); $id = mysql_insert_id(); // Request info $result = mysql_query( SELECT * FROM supportsys WHERE email = $email); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } I basicly need to get the id$ of the record just entered -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] getting ID
Yap ... this works quite fine with Sybase Thank you very much ... -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 12:27 To: Walter, Marcel Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] getting ID With MSSQL I do: $result=mssql_query(select @@IDENTITY as 'jobNumber'); $row=mssql_fetch_array($result); $insertid=$row[jobNumber]; May be similar for sybase.. I understand they have similar origins.. Tony Walter, Marcel To: 'Ian Grant' [EMAIL PROTECTED], [EMAIL PROTECTED] Marcel.Waltercc: @drkw.comSubject: RE: [PHP-DB] getting ID 08/20/2001 11:22 AM Is there a similar function for a Sybase - Database ? -Original Message- From: Ian Grant [SMTP:[EMAIL PROTECTED]] Sent: Monday, August 20, 2001 12:20 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] getting ID mysql_insert_id([resource link_identifier]) returns the value of the auto_increment field for the previous INSERT query. It will return 0 if there is not an auto_increment field. If the link_identifier is not specified, the last opened connection is used. So, use $id = mysql_insert_id(); directly after your $result = mysql_query($query); operation (where $query is an INSERT query) to pull the id value you have just auto inserted back out. Ian. Manual page: http://www.php.net/manual/en/function.mysql-insert-id.php Crosswalkcentral [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried this and it gave me an error. Will this $id = mysql_insert_id(); allow me to pull out the id? -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! Cynic [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 19:19 8/19/2001, CrossWalkCentral wrote the following: -- I have a script where I submit user data to the database in my script I need to get the id # how can I do this w/o creating a query that does the following considering that user could have 10 other entires. mysql_query(insert into ...); $id = mysql_insert_id(); // Request info $result = mysql_query( SELECT * FROM supportsys WHERE email = $email); if (!$result) { echo(PError performing query: . mysql_error() . /P); exit(); } I basicly need to get the id$ of the record just entered -- Cross Walk Central www.crosswalkcentral.net Support Center Your Web Hosting Community! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's ri
RE: [PHP-DB] delete user but keep the article
Do you really have to delete the users ? You could for example give the users a special flag which shows that the users can´t no longer log in ... so you have still the information about your user and the user cannot log in (at least if you check the flag) Is this okay ? -Original Message- From: RSalomo [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 11:21 To: [EMAIL PROTECTED] Subject: [PHP-DB] delete user but keep the article hi, i have a news article database that input by users, for example articlename: 'abc', input by username: 'user_x'. i want to delete user_x, but keep article abc. how php/mysql display that there is article named 'abc', input by 'user_x', but there are no further information about that user (except maybe only his firstname) because user_x no longer exists. how can i do this? thanks rudy. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] How to create table?
pet (name VARCHAR(20) is okay Because he wrote: create table pet ( -- pet = Table Name name VARCHAR(20), owner ) the query is okay ... But I would allow NULL in the death - column (I don´t know what the default is in MySql) Or is every (!) pet you enter in your table already dead ? = CREATE TABLE pet ( name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE NULL ); -Original Message- From: Miles Thompson [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 14:41 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] How to create table? Jan, to which you add $result = mysql_query( $table ); which will execute your statement and create the table. And I think pet (name VARCHAR(20) should bepet VARCHAR(20) HTH - Miles At 02:03 PM 8/15/01 +0200, Jan Grafstrom wrote: Hi! I have just started to learn about mysql and wonder if my code is good? ?php $connexion = mysql_connect(localhost,login,passwd) or die (ERROR de connexion on Server); print (Connection ok); mysql_select_db(database_name,$connexion) or die (Cant find db); $table= CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20), species VARCHAR(20), sex CHAR(1), birth DATE, death DATE); ? Thanks in advance for any help. Regards Jan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] A newbie question
You tried this: print(a href=whateverpage.phpLink/a); = Watch the ... How should print know where your output is terminating ? Try either: print a href=\whateverpage.php\Link/a; - In here you can use variables (like: $link) they will get parsed ... Or: print 'a href=whateverpage.phpLink/a';- Note: In here you cannot use variables ... -Original Message- From: Wilmar Pérez [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, August 15, 2001 15:48 To: PHP List Subject: [PHP-DB] A newbie question Hi guys This may sound a bit silly but don't know how to do it. I've got the following print statements, I would like them to be links, how do I do that? print(liComunicaciones/libr); print(liInvidentes/libr); print(liCirculación/libr); print(liReferencia/libr); print(liHemerotecas/libr); print(liCentro Referencial/libr); print(liPatrimonio Cultural/libr); print(liCapacitación/libr); print(liProcesos Técnicos/libr); Thanks a lot Pd: The a href=whateverpage.phpLink/a gives me an error on loading the page --- Wilmar Pérez IT Manager - Central Library University of Antioquia Medellín - Colombia tel: ++57(4)2105145 --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] database abstraction for php3
I use the CDBAbstract but don´t know if it is possible to use it with PHP3 ... Just give it a try Go to http://www.zend.com/codex.php?id=105single=1 Although I have changed it a bit to fit my needs the version you get there is quite good ... Cheers, Marcel -Original Message- From: Geoffrey Makstutis [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 17:35 To: [EMAIL PROTECTED] Subject: [PHP-DB] database abstraction for php3 Hi, Can anyone suggest a good (and simple) database abstraction class for php3? I have been using ADODB, but it doesn't like php3. Thanks - Geoffrey Makstutis [EMAIL PROTECTED] 51% Studios Architecture + Design 1-5 Clerkenwell Road London EC1M 5PA www.51pct.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Access counter
Another idea of mine: You could start sessions and register a variable... and everytime a new user wants to request a page you can find out whether its a new user or not if you check the variable ... If it is new, then do the stuff below ... elso don´t ... Cheers, Marcel -Original Message- From: leo g. divinagracia iii [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 06:25 Cc: PHP-DB Subject: Re: [PHP-DB] Access counter in a simple way, yes. if you really want unique users, you can setup a table and insert the IP addresses in their and query it everytime. the PHP variable that keeps track of the user'a IP address can also be checked by storing it in a variable and re-checked each time the page is loaded. Shahmat Dahlan wrote: If I do the below, like you stated, that means the counter will update everytime a visitor refreshes the content. Would it be possible for the counter script not to increase the value by 1 when a visitor merely refreshes. Is it possible to let the script increase the value by only by one, only if the the visitor for a new content (by clearing the cache, e.g.). Thanks you replying.. leo g. divinagracia iii wrote: in pseudo-code: make a text file - associate it a URL when a user comes along, have a PHP script on top of the web page to 1. open the text file 2. counter = counter +1 3. write update 3.5 print number of hits somewhere on webpage 4. close file... Shahmat Dahlan wrote: I'd like to do a counter with PHP, how do you do this? I thought maybe I could either use cookie or session or session? Which should I use ? -- Leo G. Divinagracia III [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Sybase Mailing List?
Sorry to ask this here, but I don´t know where to ask else ... Does someone know a good mailinglist about specific sybase questions? I have some questions about BCP ... MfG Marcel Walter Dresdner Kleinwort Wasserstein Foreign Exchange Money Market Address:Jürgen-Ponto-Platz 1, 60301 Frankfurt/Main * mailto:[EMAIL PROTECTED] * (0 69)-263-12730 If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DB] Protecting database password
On Unix it is possible to make an include file with all the settings like $user, $passwd and so on and store it somewhere in the filesystem (not under your htdocs-path) So no one can access this file via web You can include this file with its variables with the include() - statement ... Imagine your PHP-Engine won´t work and someone accesses a page where you included this file with the settings he will never see your Password but just the include-statement ... nothing else ... And he won´t be able to access the file since its not in yout /htdocs - Path ... Cheers, Marcel -Original Message- From: Marco Draijer [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, July 18, 2001 09:41 To: [EMAIL PROTECTED] Subject: [PHP-DB] Protecting database password For a PHP-application on Windows NT, I am using an Oracle database and the database-interface db_oci8.inc (a PHP-class, downloaded from the net). To be able to make the connection to the database, the class has to know the databasename, username, and password. At the moment, it is hardcoded in the include-file. This file can be downloaded by anyone who knows its exact name and location (which is not hard, of course). I want to prevent this. I have tried some things with permissions, but I could not find a solution there. A known solution on Windows-platforms is, to put the names password in the registry of the server, but I don't know how I can read data from the registry in PHP. Another solution is to use environment variables. I know how to read them: the documentation says that getenv() gives the environment of the client, but that is not true, at least on NT it gives the environment of the server. But then again: of which user is that environment and won't it be easy to read that environment over the internet? Can anyone give me advice on this? Furthermore I will be setting up a similar construction (PHP + password protected database) on a Linux machine. So I am also interested in Unix-only solutions. Thanks in advance, Marco Draijer -- ** ** This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is only intended for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. ** ** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Connecting to Sybase-DB on another UNIX-Machine
Hello, I´m trying to connect a UNIX-Machine (Apache 1.3.19 and Php-4.0.5) with a Sybase Database on another Machine (The Sybase engine is not completely installed on this machine but I already compiled Sybase-Support into PHP and it worked ...) I can also use the isql-tool via command-line to connect to a Sybase database on another server (So, the Server exists in the interfaces-file) But when I try this: sybase_connect(SERVER,USER,PASSWD); I don´t get a link-identifier back ... The Parameters are correct !! What could be the problem ??? MfG Marcel Walter If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]