[PHP-DB] Re: multiple forms, one submit button

2002-02-12 Thread Alecs
I wonder how to you POST all forms with one submit (and without JS) ... Marius Ursache [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi is it posibile to have in a php script multiple forms and only one submit button? if yes, how you recover the submited

[PHP-DB] Fwd: php-db Digest 11 Feb 2002 20:12:53 -0000 Issue 1046

2002-02-12 Thread Neil Smith
My best shot (very reliable) is bodged together and adapted from various sources. Try this : $comes_from=array(HTTP_VIA , HTTP_X_COMING_FROM , HTTP_X_FORWARDED_FOR , HTTP_X_FORWARDED , HTTP_COMING_FROM , HTTP_FORWARDED_FOR , HTTP_FORWARDED); // This array *should* hold most of the possible

Re: [PHP-DB] Re: multiple forms, one submit button

2002-02-12 Thread Jonathan Underfoot
Ok I think I understand where your comming from now. You have multiple forms on one HTML page.. and you want one submit button to send all the forms to their respective PHP scripts. I dont know how to do that, with my knowledge of HTML I don't even think its possible. I would make one form

[PHP-DB] Fwd: php-db Digest 12 Feb 2002 09:59:09 -0000 Issue 1047

2002-02-12 Thread neil smith
Yup, session variables are the way to go (man!) I just set up something similar at http://www.fresh-toast.net/netmeeting, when a user has successfully registered or logged in , a session variable is set. Make sure to start a session at the top of your script. session_start(); $user_id=105;

[PHP-DB] Fwd: php-db Digest 11 Feb 2002 20:12:53 -0000 Issue 1046

2002-02-12 Thread Neil Smith
My 2 cents : In fact Todd has also been spouting ( moaning? g ) on the Windows/PHP list too ;-) Certainly, parsing Word docs is not necessarily a PHP-DB issue, but an interesting problem or hack nonetheless. IMHO M$ have set themselves up for 'illegal' hacking of their file formats simply by

[PHP-DB] ereg-digits only...

2002-02-12 Thread B. Verbeek
How do I check a string for it to only contain numbers? if(!ereg(([0-9]+),$string)){ print It contains characters other than numbers; }else{ print Only numbers; } Can anyone give some feedback... regards, Bart -- PHP Database Mailing List (http://www.php.net/) To

[PHP-DB] mysql_connect()

2002-02-12 Thread Martin Allan Jensen
Hi all. once again i need help... I tried a lot of stuff but my server (linux) (php 4.0.6) won't use the mysql_connect() command..?? Anyone else have an solution for the problem..?? Kind regards Martin Allan Jensen

[PHP-DB] Drop Down Menus

2002-02-12 Thread Bzdpltd
Hi wonder if anyone knows what I am doing wrong here. I have a drop down selection menu that is generated from a mysql database. In the database we have over 15 fields one of them contains text for the catergory that the entry belongs to. I have used the following code to generate my drop down

RE: [PHP-DB] mysql_connect()

2002-02-12 Thread Rick Emery
What is the exact error you are getting? I'm going to guess something along the lines of unidentified function mysql_connect(). If that's the case, that means you do not have mysql functionality compiled into your web server. Speaking of which: what is your Linux system (RedHat SuSe, etc)?

RE: [PHP-DB] Drop Down Menus

2002-02-12 Thread Rick Emery
FROM THE MANUAL: mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0. Therefore: print(option value=\$row[0]\$row[0]/option\n);

[PHP-DB] mysql_connect()

2002-02-12 Thread Martin Allan Jensen
Sorry folks, last time i wrote it to fast! Well here is the hole story We got an organisation to install a new version of phpmyadmin, mySQL and PHP 4.0.6 on our Cobalt Raq 4r server (Linux) They got it installed and phpmyadmin is working finebut when i call fro a script souch as

RE: [PHP-DB] mysql_connect()

2002-02-12 Thread Rick Emery
Re-read my previous email. You do not have mysql functionality compiled into PHP and you web server. The clue is the phrase undefined function: mysql_connect(). How did you load PHP, MYSQL, etc? -Original Message- From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: [PHP-DB] mysql and dropdown menus

2002-02-12 Thread Rick Emery
When you include $Select in your URL, did you remember to urlencode() it first? If no, the spaces will blow your URL away...very nasty... BTW, it helps if you post code. -Original Message- From: jeff akerman [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 4:27 PM To: [EMAIL

Re: [PHP-DB] mysql_connect()

2002-02-12 Thread Sharif Islam
Check your php install:test.php : ? phpinfo(); ? ) (( ||-. | :|/' -`--'- On Tue, 12 Feb 2002, Martin Allan Jensen wrote: Sorry folks, last time i wrote it to fast! Well here is the hole story We got an organisation to install a new version of phpmyadmin, mySQL and PHP

[PHP-DB] Re: php-db Digest 11 Feb 2002 20:12:53 -0000 Issue 1046

2002-02-12 Thread Frank Flynn
On 2/11/02 12:12 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It sounds to me like you are blowing away name in the URL when you submit a new form. ../index.php?name=My Name Is just like clicking the submit button on a form with: action = ../index.php method = get When you users use a

RE: [PHP-DB] Drop Down Menus

2002-02-12 Thread Peter Lovatt
Hi the row index starts at 0 not 1 so you need $row[0], as you have only one field $row[1] will be empty. HTH Peter --- Excellence in internet and open source software --- Sunmaia www.sunmaia.net [EMAIL

[PHP-DB] Select rows where ?

2002-02-12 Thread Dave Carrera
Hi All How do I select the rows that DO NOT contain a certain character. I.e. : select * from tablename where field dose not contain A Any pointers as always appreciated. davec Dave Carrera Website Designer http://www.davecarrera.com -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] Select rows where ?

2002-02-12 Thread Rick Emery
select * from tablename where field NOT LIKE %A%; -Original Message- From: Dave Carrera [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:39 PM To: php List Subject: [PHP-DB] Select rows where ? Hi All How do I select the rows that DO NOT contain a certain character. I.e.

Re: [PHP-DB] Select rows where ?

2002-02-12 Thread Jim Lucas [php]
select * from table where columnsomething select * from table where column NOT LIKE %something% Jim Lucas - Original Message - From: Dave Carrera [EMAIL PROTECTED] To: php List [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 10:39 AM Subject: [PHP-DB] Select rows where ? Hi All

RE: [PHP-DB] Select rows where ?

2002-02-12 Thread Gurhan Ozen
SELECT * FROM table WHERE COLUMN_NAME NOT LIKE '%unwanted_String%'; when the field type is number you can use SELECT * FROM table WHERE COLUMN_NAME != unwanted_number; or SELECT * FROM table WHERE COLUMN_NAME unwanted_number; Gurhan -Original Message- From: Dave Carrera

[PHP-DB] numeric string problem

2002-02-12 Thread Mike
Hi, I am using VARCHAR for price column : 600,000 700,000 etc when I use : PRICERANGE='$Price' it works fine except when the $Price moves to 7 digit as 1,000,000 in other words the less than does not work when comparing 6 digit and 7 digit figures I am not sure how to compensate for this.

RE: [PHP-DB] numeric string problem

2002-02-12 Thread Rick Emery
The question is: why use varchar? Why not use INT, then format to includes commas when displaying? -Original Message- From: Mike [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 3:38 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] numeric string problem Hi, I am using VARCHAR

[PHP-DB] mysql_connect() and phpmyadmin

2002-02-12 Thread Martin Allan Jensen
I just don't understand why phpmyadmin works with it when i can't call it.! I did try with localhost but it won't still work.. PLEASE help i just can't understand it Kind regards Martin -Original Message- From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]] Sent:

[PHP-DB] Required pages...

2002-02-12 Thread jas
I am wondering if there is a way to force users to come from a certain page. For an example I am using a login page which once authenticated allows users to change the contents of a web site without knowing alot of code etc. What I would like to do is make sure that the content management system

RE: [PHP-DB] Required pages...

2002-02-12 Thread Rick Emery
Verify that $HTTP_REFERER is the URL the user was supposed to come from. Somethig like (you may have to tweak it because I cannot test where I am now): if( strcmp($HTTP_REFERER,www.mydomain.com/login.html) ) { header(Location: http://www.mydomain.com/login.html;); exit; }

Re: [PHP-DB] Required pages...

2002-02-12 Thread Jonathan Underfoot
Personally, I'm not quite sure what the best way to do it would be. (I don't use sessions personally.) But I've noticed recently on certain less than scrupulous websites that they're using javascript to track down the user's last page (to make sure they voted.) You'd have to track down the

Re: [PHP-DB] Required pages...

2002-02-12 Thread Sam Masiello
Don't use HTTP_REFERER as is it not always available and can be munged. If you just want the user to have to use some sort of authentication, you could always create a page that uses PHP_AUTH and require that page on all of your subsequent pages. It isn't PHP sessions or cookies, but it is a

Re: [PHP-DB] Required pages...

2002-02-12 Thread William Fong
I am not sure if JavaScript is a really good idea in this case because if the user has JavaScript turned off, what will happen? I believe the HTTP_REFERRER is the best. Not sure the exact syntax of that either. Another question pops up. What will happen now if the user does not log in? If a

[PHP-DB] cast (int) question

2002-02-12 Thread Mike
I am using commas in a form for figures that is using the commas for thousand seperator ie: 600,000 up to and over 1,000,000 1,200,000 etc I am using this to convert to INT for a mySql query: $ThisPrice=(int)$Price ; I do not see how I deal with the comma however. I use:

Re: [PHP-DB] Required pages...

2002-02-12 Thread Miles Thompson
This is at the top of every file requiring an authenticated user on one of our sites: ? include(secure.php)? and secure.php consists of this, all on one line, with no cr or lf at the end. ? session_start();session_register( origin );$origin=$PHP_SELF; if( $HTTP_SERVER_VARS[ PHP_AUTH_USER ]

[PHP-DB] Oracle... Beginner

2002-02-12 Thread Todd WIlliamsen
I would like to try Oracle as a backend. I do have a copy of Oracle 8 server, Oracle Application Server, Oracle Internet Commerce Server. I am running Windows 2000 server, so all these will and should run on Win2k. I never used Oracle, so I would like to know: 1. What is the procedure of

[PHP-DB] Flipping through database records

2002-02-12 Thread Dan Swensen
Hello, I am attempting to put together a page whereby results from a database are displayed, and previous / next hyperlinks allow the user to flip through records, one at a time. I attempted to do this by using a unique ID (that auto increments) and then including links like so at the bottom of

Re: [PHP-DB] Flipping through database records

2002-02-12 Thread Jason Cox
Dan, Here's an idea for you: Rather than try to pass the uid through the pages, pass a counter that will act as an index to your result array. For example, let's say you have a query like: select * from myTable order by someCol; The order by will help give some sort of uniformity to the list

Re: [PHP-DB] Flipping through database records

2002-02-12 Thread olinux
Interesting Jason, just to make sure I'm clear: basically, you would query the table and while loop through the query result and create an array and then store that in a session? olinux --- Jason Cox [EMAIL PROTECTED] wrote: Dan, Here's an idea for you: Rather than try to pass the uid

Re: [PHP-DB] mysql and dropdown menus

2002-02-12 Thread Philippe COLLEU
Jeff, I solved the problem by using a different frame for each drop down menu. In my case I had 5 drop down menus interacting together and selecting their values from the database. Then I'm passing the value of each variable to the other frames (affected by the selection) using a javascript

Re: [PHP-DB] Drop Down Menus

2002-02-12 Thread Todd WIlliamsen
here is an example from my page: ? $connection = mysql_connect($databaseserver, $databaseuser, $databasepass) or die(Can't connect to DB); $db = mysql_select_db($databasename, $connection); $sql= SELECT id, State FROM $statetable ORDER BY State ASC; $result= mysql_query($sql, $connection);

Re: [PHP-DB] Flipping through database records

2002-02-12 Thread Todd WIlliamsen
how about just not do it by userid? query some other column thats in there maybe by last name? SELECT * FROM $tablename WHERE lname = $lname LIMIT [#results per page] That should eliminate gaps Olinux [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Interesting

Re: [PHP-DB] Flipping through database records

2002-02-12 Thread Dan Swensen
Actually, I didn't think of that. That may work. Thank you, Mr. Williamsen and Mr. Cox for your suggestions. I will try out both solutions. - Original Message - From: Todd WIlliamsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 12, 2002 10:09 PM Subject: Re: [PHP-DB]

Re: [PHP-DB] Flipping through database records

2002-02-12 Thread Dan Swensen
Actually, now that I think of it... how would you move from one record to the next, if not querying by userid? Optimally, I would like to have a page that displays one row from a table, and links that will allow a user to go to the next or previous row via hyperlink. At first glance I can't

[PHP-DB] Re: Oracle... Beginner

2002-02-12 Thread Philippe Saladin
PHP has to be compiled with the oci8 extension. If you use the win32 binaries of PHP, just uncomment the line extension=php_oci8.dll in php.ini. If your webserver and Oracle are on the same machine, that's all. In the other case you have to install the oracle 8 client onto the machine containing