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
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
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
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;
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
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
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
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
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)?
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);
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-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,
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
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
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
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
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
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.
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
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
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.
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
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:
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
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;
}
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
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
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
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:
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 ]
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
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
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
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
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
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);
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
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]
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 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
40 matches
Mail list logo