Hello to all.
I am a relative newcomer to PHP. I am trying to pass the value of a variable from a
MySQL database from one PHP page to another PHP page. On the first page, I've made
the connection to the database, and the query works just fine, displaying the correct
values from the $myrow field
- Original Message -
From: "Phil Matt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 27, 2004 17:08
Subject: [PHP-DB] Problem with passing variables
> Hello to all.
>
> I am a relative newcomer to PHP. I am trying to pass the value of a
variable from a
> MySQL datab
If you have something like this:
echo '';
It wont work. Use instead:
echo '';
Notice the '. before the $myrow[0] and the .' after, any doubt see the
documentation about operators.
This is caused because the ' doesnt parse variables to values like the "
does.
- Original Message -
From:
Haven't been following this thread, but here's how we do it:
If($bgc == '') {
$bgc = "#DD";
} elseif($bgc == "#FF") {
$bgc = "#DD";
} else {
$bgc = "#FF";
}
Gary Every
Sr. UNIX Administrator
Ingram Entertainment Inc.
2 Ingram Blvd, La Vergne, TN 37089
"Pa
It isnt pretty, efficient or small, but it works... :)
- Original Message -
From: "Gary Every" <[EMAIL PROTECTED]>
To: "Ryan Jameson (USA)" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, January 27, 2004 4:13 PM
Subject: RE: [PHP-DB] Results with ledger stripes?
Haven't been fo
On 27 Jan 2004 at 15:56, Ricardo Lopes wrote:
> If you have something like this:
>
> echo ' class="imglink" alt="Click to send mail to this person" />';
>
> It wont work. Use instead:
>
> echo ' src="graphics/mail.gif" class="imglink" alt="Click to send mail to this
> person" />';
>
> Notice t
Yes, the sintax is correct (if you are inside an echo or inside a print
opened with ' and not with "). ex:
echo '';<--
correct
echo ""; <---
error !!! (parse error)
I know that you must be using the first one, but just in case ...
You can also do something different, put your html code as
Hello
I'm having a devil of a time with my form. I'm able to process checkboxes and fields
but am having trouble with radio buttons.
Here's how I'm doing the fields which works:
Your Last Name
Title
Mignon Hunter wrote:
Operation & Maintenance
Engineering (Including Project Management)
Management (other than corporate)
Other - Please Specify
Hello
I'm having a devil of a time with my form. I'm able to process checkboxes and fields
but am having trouble with radio buttons.
Here's how I'm doing the fields which works:
Your Last Name
Title
THANK YOU
duh me
I knew it was something simple :(
Mignon Hunter
Webmaster
Toshiba International Corporation
(713) 466-0277 x 3461
(800) 466-0277 x 3461
>>> Stuart <[EMAIL PROTECTED]> 01/27/04 11:41AM >>>
Mignon Hunter wrote:
>
> Operation & Maintenance
>
>
HI there Everyone,
Finally found the list address again, my computer crashed and I lost everything, sigh.
Anyway, i'm zipping a file and it's zipping the filename ok but not the file and I
have a feeling it's something wrong with the below, as I get an error on the filesize
parameter saying no
How do most of you handle variables in next page after passing.
For instance. What I have right now (very ugly) is:
$email = $_POST['emal'];
$first = $_POST['first'];
$lastl = $_POST['last'];
Then I work with $email, $first etc...
I will have to do this for many, many variables which doesnt se
You probably need to specify the path in the filesize call also. It
looks like you are just pushing the filename.
Like
$filepath = "/home/www/nortonway/photos/$filename";
$fd = fopen($filepath, "rb");
$filedata = fread ($fd, filesize($filepath));
$zipfile -> add_file($filedata, "$filename");
I love this one...
extract($_REQUEST);
but it undermines the whole reason PHP moved to the new default
parameter specification. Be careful with you coding. I use it, and it
makes things much like the pre 4.3.2 release without changing the ini
files. You just have to specify the default $_serve
It appears the intention of the text input is to provide an "other" job
type.
Instead of removing it, rename it to "job_other" or something.
Then test for the value of "job", if "other" use "job_other" value.
> -Original Message-
> From: Stuart [mailto:[EMAIL PROTECTED]
> Sent: Tuesday
I tried what you had suggested and I still get the same result.
Robert Twitty wrote:
The date() is for use with the 32-bit C time value returned by functions
like time(). Data from fields of type datetime are returned as strings in
the form Jan 9 2004 by the mssql extension as the default. To
Situation:
The Application is written in php 4.3.4 runs on apache 2.0.45 and uses mySQL
4.1.1.
All tables in the database are defined with a charset UTF-8.
The Application uses the Apache Module and works very well.
Now the application must use coding which is not included, we want to call
anot
On Tuesday 27 January 2004 17:13, Ricardo Lopes wrote:
> It isnt pretty, efficient or small, but it works... :)
Try this:
$c= (++$ZZ%2? 'yellow':'white');
printf("");
>
> - Original Message -
> From: "Gary Every" <[EMAIL PROTECTED]>
> To: "Ryan Jameson (USA)" <[EMAIL PROTECTED]>; <[EMA
Mignon Hunter wrote:
How do most of you handle variables in next page after passing.
For instance. What I have right now (very ugly) is:
$email = $_POST['emal'];
$first = $_POST['first'];
$lastl = $_POST['last'];
Why are you recreating variables? You already have a variable
$_POST['email'], so
Oops
Use "Off" instead of "On", or execute this in your script:
ini_set('mssql.datetimeconvert' , 0 );
Note: Do not use the date() function to display the value. Just display
it "asis".
-- bob
On Tue, 27 Jan 2004, Steve wrote:
> I tried what you had suggested and I still get the same result.
So it will be easier to use in my script on this page, where I'm creating several
query strings with the data.
Mignon Hunter
Webmaster
Toshiba International Corporation
(713) 466-0277 x 3461
(800) 466-0277 x 3461
>>> "John W. Holmes" <[EMAIL PROTECTED]> 01/28/04 01:15PM >>>
Mignon Hunter wrot
Also, many legacy applications use the non $_POST variable definitions.
A problem that I ran into.
- Paul
-Original Message-
From: Mignon Hunter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 1:47 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] php-db glob
How would you extract variables from arrays?
before I was doing
$prod[] = $_POST['prod'];
$choice[] = $_POST['choice'];
then I could iterate through $prod[], $choice[]
Mignon Hunter
Webmaster
Toshiba International Corporation
(713) 466-0277 x 3461
(800) 466-0277 x 3461
>>> "Paul Miller" <[EMA
Hi,
When Oracle returns the result set, the
field names are all in upper case. However, I have an application that needs to
work on both MSSQL and Oracle. I don’t want to keep 2 copies. One has
upper case field names and the other lower case. How could I make PHP or ADODB
to work with lowe
I am not 100% sure what you are doing here, so I am responding with
this...
if (is_array($_POST['prod']) {
// Value is an Array
$prod = $_POST['prod'];
}else{
// Value is not an array, but the value
// is added to the first element.
$prod[] = $_POST['prod'];
the way I do it is with http://www.ytztech.com product SQL_AL.PHP which
has a switch that will say all values are upper or lower. You can also
create a simple wrapper function that will do the lower conversion.
- Paul
-Original Message-
From: William Cheung [mailto:[EMAIL PROTECTED]
Se
Paul Miller wrote:
Also, many legacy applications use the non $_POST variable definitions.
A problem that I ran into.
So how is saying
$email = $_POST['email']
going to help you in that case??
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Maga
Mignon Hunter wrote:
So it will be easier to use in my script
on this page, where I'm creating several
query strings with the data.
I understand it's easier to type $email vs. $_POST['email'] at first,
but not once you get used to it. Both are variables that can be used in
the same exact way, o
Mignon Hunter wrote:
How do most of you handle variables in next page after passing.
For instance. What I have right now (very ugly) is:
$email = $_POST['emal'];
$first = $_POST['first'];
$lastl = $_POST['last'];
Then I work with $email, $first etc...
I will have to do this for many, many varia
As mentioned in my first email, PHP and myself think turning the global
var reg off is a good thing, especially for inexperienced coders and var
definition.
$email = $_POST['email'] makes a difference is you are dealing with an
application that was built during the 90% of PHP's lifetime where reg
I might try having a common PHP function that converts all field names to
lower case, and call that function with every field name.
Or call each field by column number, $row[1] .
> When Oracle returns the result set, the field names are all in upper
> case. However, I have an application that n
From: "Daniel Clark" <[EMAIL PROTECTED]>
> I might try having a common PHP function that converts all field names to
> lower case, and call that function with every field name.
>
> Or call each field by column number, $row[1] .
Like http://us2.php.net/manual/en/function.array-change-key-case.p
Yeah, Looks good to me :-)
> Like http://us2.php.net/manual/en/function.array-change-key-case.php ??
>
>> > When Oracle returns the result set, the field names are all in upper
>> case. However, I have an application that needs to work on both
>> MSSQL and Oracle. I don?t want to keep 2 copies. On
This doesn't have anything to do with PHP, but it does have to do with
MS SQL server and I know we've got a buncha smart folks on this list.
I'm sure you'll forgive the slightly OT post.
I have a stored procedure that I want to protect from external rollback
calls. Basically, it logs calls to itse
Hi All,
How do i calculate time in PHP lets say I have this example
Input Time Started : 9:00
Input Time Ended : 13:00
Answer
Total Time in Hours : 4
Total Time in Minutes : 240
Any help will be appreciated.
Thanks
Delz
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, v
36 matches
Mail list logo