[PHP-DB] Open file dialog box to save static file

2002-05-12 Thread Howard Picken

I'm looking for a way to do the following

I've created a php/mysql site for my wife for various
database lists she has. 

She uses PHP locally on our on web server to add/manage
entries but a lot of the pages need to be static and uploaded
to a specific site (no PHP/MySQL).

So I've give her a link that calls another php page to "generate"
and view the static page in the format she requires.  She then has to
view the source of that page hilight and copy it over the top
of the old page on her PC, then upload it to the site.

Now... what I would to be able to do is instead of her having to 
view source etc. I would like to be able to call up a Windows 
file save dialog box (maybe even going staright to the correct folder)
so that the file can just be saved.

I can't find anything in the PHP manual about this.  Anyone done it
or have any ideas?

Howard



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Open file dialog box to save static file

2002-05-12 Thread Peter Lovatt

Hi

you can use php to write the html to a file, rather than having to do it all
manually.

Look at

fopen()

Not sure if this is exactly what's needed, but it might be.


HTH

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
[EMAIL PROTECTED]
tel. 0121-242-1473
---

> -Original Message-
> From: Howard Picken [mailto:[EMAIL PROTECTED]]
> Sent: 12 May 2002 10:05
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Open file dialog box to save static file
>
>
> I'm looking for a way to do the following
>
> I've created a php/mysql site for my wife for various
> database lists she has.
>
> She uses PHP locally on our on web server to add/manage
> entries but a lot of the pages need to be static and uploaded
> to a specific site (no PHP/MySQL).
>
> So I've give her a link that calls another php page to "generate"
> and view the static page in the format she requires.  She then has to
> view the source of that page hilight and copy it over the top
> of the old page on her PC, then upload it to the site.
>
> Now... what I would to be able to do is instead of her having to
> view source etc. I would like to be able to call up a Windows
> file save dialog box (maybe even going staright to the correct folder)
> so that the file can just be saved.
>
> I can't find anything in the PHP manual about this.  Anyone done it
> or have any ideas?
>
> Howard
>
>
>
> --
> 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] Re: Easy one for you guru's :-)

2002-05-12 Thread Jason Morehouse

Here is a simple cart, but should give you the idea.

Cheers!
-J

$name,'price'=>$price,'qty'=>$qty);
break;

 # Remove from cart   
 case 'remove':
# Remove item
unset($_SESSION['cart'][$id]);
break;
}

# Show cart contents if any
if (count($_SESSION[cart]) > 0) {
print "Cart contents:";
foreach($_SESSION[cart] as $id => $value) {
print " $value[qty] $value[name] (@\$$value[price])";
$total += $value[price] * $value[qty];
}
print "Total: \$$total";
}

# a product
$id = 101; $name = 'beer'; $price = '3.15';
?>  
  
Qty: 
Product: 
Price: $ NZD
 Add
 Remove 





 
?>
On Sun, 12 May 2002 06:02:39 +1200, Dave Carrera wrote:

> Hi All
> 
> 
> 
> Can someone breakdown the logic of adding and subtracting products to a
> shopping cart using sessions.
> 
> 
> 
> I can't quite get the logic so something in plain English would help
> very much.
> 
> 
> 
> Any helpful advice, pointers or even code examples are very much
> appreciated.
> 
> 
> 
> Thank you fully in advance for any help you may give.
> 
> 
> 
> Dave C
 

-- 
.--- .- ... --- -. /  -- --- .-. .  --- ..- ... .

 Jason Morehouse
 [EMAIL PROTECTED]
  
 Netconcepts LTD
 Auckland, New Zealand

 - Linux: because rebooting is for adding hardware.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Open file dialog box to save static file

2002-05-12 Thread Howard Picken

No that wouldn't work because the formatted page looks
quite different from the page she uses for admin.

I've been looking for some samples for fopen() coding,
cause I'm relatively new to this PHP game, I think
I've found an example that might be useful though so
I'll play around a bit and see what I can learn.

Thanks Peter

---
Hi

Just occurred to me - can you just use the browser to 'Save page as' and
change the file name to page.htm instead of page.php?

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
[EMAIL PROTECTED]
tel. 0121-242-1473
---

> -Original Message-
> From: Howard Picken [mailto:[EMAIL PROTECTED]]
> Sent: 12 May 2002 10:05
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Open file dialog box to save static file
>
>
> I'm looking for a way to do the following
>
> I've created a php/mysql site for my wife for various
> database lists she has.
>
> She uses PHP locally on our on web server to add/manage
> entries but a lot of the pages need to be static and uploaded
> to a specific site (no PHP/MySQL).
>
> So I've give her a link that calls another php page to "generate"
> and view the static page in the format she requires.  She then has to
> view the source of that page hilight and copy it over the top
> of the old page on her PC, then upload it to the site.
>
> Now... what I would to be able to do is instead of her having to
> view source etc. I would like to be able to call up a Windows
> file save dialog box (maybe even going staright to the correct folder)
> so that the file can just be saved.
>
> I can't find anything in the PHP manual about this.  Anyone done it
> or have any ideas?
>
> Howard
>
>
>
> --
> 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] Client IP

2002-05-12 Thread Hayan AL Mamoun

Dear all,
I'm using the $REMOTE_ADD variable to get the visitor IP address, but when a
visitor access my website throught a proxy server I get always the same ip
of that proxy server.
Is there a way to get the unique IP of each users???

bst rgds
Hayan


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Upcoming event script

2002-05-12 Thread Andrew

I'm sorta new at php, as most of my experience is in ASP...so I need a
little help.

I am making a "next upcoming event" script. Basically, I want to be able to
put into mysql a description of the even and a date where the posting should
start, and I want to be able to make it show the most recently passed post
date. So in other words, if today is June 1 2002, and I have 3 records with
post dates of May 28, March 22, and June 13 of that year, I want it to show
the May one. How do I sort this? I know that in ASP it would be "SELECT text
FROM events WHERE date < " & now() & "SORT BY date DESC", but how do I do it
in php?




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Client IP

2002-05-12 Thread Jason Wong

On Sunday 12 May 2002 21:49, Hayan AL Mamoun wrote:
> Dear all,
> I'm using the $REMOTE_ADD variable to get the visitor IP address, but when
> a visitor access my website throught a proxy server I get always the same
> ip of that proxy server.
> Is there a way to get the unique IP of each users???

If someone connects through a proxy then you might be able to use 
$HTTP_X_FORWARDED_FOR, but that depends on whether the proxy gives that info.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
Today you'll start getting heavy metal radio on your dentures.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Syncing two tables in mysql

2002-05-12 Thread Jason Wong

On Sunday 12 May 2002 13:37, Thomas \"omega\" Henning wrote:
> And how can i use it?

I suppose the manual will have full details.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
Whenever I feel like exercise, I lie down until the feeling passes.
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Client IP

2002-05-12 Thread Sebastian Tschiatschek

Take a look at the following page:
http://www.cgsa.net/php/identifierShow.php

The script for getting the original ip-address is quite good.

hth
Sebastian

--
Tschiatschek Sebastian, [EMAIL PROTECTED] | System Consulting
Graz, AUSTRIA  / High Availability/Cluster
Mobile: +43 676 84552713  / Web Development
Fax: +43 316 428896  / Unix & Network Administration



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Date problem

2002-05-12 Thread its me

i get $postdate from my mysql database,the problem is that i want to increase that 
date by 6 months??
its stored in mysql as date field





-
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
-

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Date problem

2002-05-12 Thread Pierre-Alain Joye

> i get $postdate from my mysql database,the problem is that i want 
> to increase that date by 6 months??
> its stored in mysql as date field
http://www.mysql.com/doc/D/a/Date_and_time_functions.html

check DATE_ADD :)

hth
pa


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Upcoming event script

2002-05-12 Thread David Robley

In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> I'm sorta new at php, as most of my experience is in ASP...so I need a
> little help.
> 
> I am making a "next upcoming event" script. Basically, I want to be able to
> put into mysql a description of the even and a date where the posting should
> start, and I want to be able to make it show the most recently passed post
> date. So in other words, if today is June 1 2002, and I have 3 records with
> post dates of May 28, March 22, and June 13 of that year, I want it to show
> the May one. How do I sort this? I know that in ASP it would be "SELECT text
> FROM events WHERE date < " & now() & "SORT BY date DESC", but how do I do it
> in php?

It depends on the column type you use to store your dates; have a look at 
the date functions in Mysql, and also have a look at LIMIT which will 
allow you to return just one record from a SELECT.

I assume you are aware of the mysql functions in PHP so I won't go into 
them.


-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Word Count, rounding and missing zeros

2002-05-12 Thread Kim Kohen

G'day All,

I'm using php to query a mysql db and I need to display a word count from
one of the columns and multiply it to get a quote.

So far I have this:

$thewords = count(split (" ","$adtext"));
$thequote = round(($thewords * .78),2);

In an example with 35 words it returns 27.3 but I'd like it to say 27.30. If
the total doesn't end in a zero it displays fine.

Is there a way to force the zero to display?

Cheers and thanks

kim


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Upcoming event script

2002-05-12 Thread Beau Lebens

assuming you are using a date format field, you can do something like (not
tested, please check syntax!)

$SQL = "SELECT text FROM events WHERE date < " . date("Y-m-d") . " SORT BY
date DESC LIMIT 1";

good luck

Beau

// -Original Message-
// From: Andrew [mailto:[EMAIL PROTECTED]]
// Sent: Sunday, 12 May 2002 3:44 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Upcoming event script
// 
// 
// I'm sorta new at php, as most of my experience is in 
// ASP...so I need a
// little help.
// 
// I am making a "next upcoming event" script. Basically, I 
// want to be able to
// put into mysql a description of the even and a date where 
// the posting should
// start, and I want to be able to make it show the most 
// recently passed post
// date. So in other words, if today is June 1 2002, and I have 
// 3 records with
// post dates of May 28, March 22, and June 13 of that year, I 
// want it to show
// the May one. How do I sort this? I know that in ASP it would 
// be "SELECT text
// FROM events WHERE date < " & now() & "SORT BY date DESC", 
// but how do I do it
// in php?
// 
// 
// 
// 
// -- 
// 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] Word Count, rounding and missing zeros

2002-05-12 Thread Gurhan Ozen

$formattedquote=sprintf("%.2f", $thequote);

See: http://www.php.net/manual/en/function.sprintf.php

Gurhan

-Original Message-
From: Kim Kohen [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 12, 2002 9:59 PM
To: PHP
Subject: [PHP-DB] Word Count, rounding and missing zeros


G'day All,

I'm using php to query a mysql db and I need to display a word count from
one of the columns and multiply it to get a quote.

So far I have this:

$thewords = count(split (" ","$adtext"));
$thequote = round(($thewords * .78),2);

In an example with 35 words it returns 27.3 but I'd like it to say 27.30. If
the total doesn't end in a zero it displays fine.

Is there a way to force the zero to display?

Cheers and thanks

kim


--
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] Re: Upcoming event script

2002-05-12 Thread Adam Royle

Should be something like so...

"SELECT text FROM events WHERE date < now() SORT BY date DESC LIMIT 1"

That should work.

Adam



[PHP-DB] Link for next db record

2002-05-12 Thread Jennifer Downey

Hi all,

Wondering if you could help or point me to a tut  where I can use a link to
get the next record in the db?

Like Previous recordNext record

How do I go about doing this.

Thanks
Jennifer

--
The sleeper has awaken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Link for next db record

2002-05-12 Thread Beau Lebens

jen,
assuming you are "currently" looking at a page which is something like
php.php?record=3, then you should be able to just do

Previous recordNext record

and then on the php.php page, you would obviously being grabbing something
from the database using a unique identifier or similar.

one "gotcha" to be careful of - if there is a chance that your id field will
have a gap in it (ie. not be perfectly consecutive) then you should make
your query something like

SELECT * FROM table LIMIT $record, 1

rather than 

SELECT * FROM table WHERE id='$record'

Since that takes them in whatever order, but only SELECTs from $record and
gets 1 record.

HTH

Beau


// -Original Message-
// From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 13 May 2002 1:14 PM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Link for next db record
// 
// 
// Hi all,
// 
// Wondering if you could help or point me to a tut  where I 
// can use a link to
// get the next record in the db?
// 
// Like Previous recordNext record
// 
// How do I go about doing this.
// 
// Thanks
// Jennifer
// 
// --
// The sleeper has awaken
// 
// 
// ---
// Outgoing mail is certified Virus Free.
// Checked by AVG anti-virus system (http://www.grisoft.com).
// Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
// 
// 
// 
// -- 
// 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] Link for next db record

2002-05-12 Thread Jennifer Downey

Hi Beau,

I have a form that selects an rv electric record here is a snip and if you
need more tell me.
This just returns a blank page.

$current_date = date("M");
$pkwh =.064;
$get_electric = "SELECT * FROM electric WHERE rv_space = $row[rv_space]";
$result = mysql_query($get_electric) or die(mysql_error());
$row = mysql_fetch_array($result);
$tot_used = $row[end] - $row[begin];
$ppkwh = .064;
$sub_total = $tot_used * $ppkwh;
$puf = '11';
$total = $sub_total + $puf;
echo "Salmon Shores RV Park ";
echo "Electric Bill for Space $rv_space";
echo "Month $current_date";
echo "";
echo "Space  Begin
EndTotal KWH UsedSubtotalPublic Use
FeeTotal";
echo "$rv_space$row[begin]$row[end]$tot_used$sub_total$puf.00$total";
echo "Return to Main Menu or";
echo "Previous
Record";
echo "Next
Record";
echo "Search Another Record";

I can get the first record say I choose space 35 if I click the link for
$row[rv_space]+1 then it returns a blank page what can I do to fix this?

Thanks again
Jennifer


"Beau Lebens" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> jen,
> assuming you are "currently" looking at a page which is something like
> php.php?record=3, then you should be able to just do
>
> Previous record href='php.php'>Next record
>
> and then on the php.php page, you would obviously being grabbing something
> from the database using a unique identifier or similar.
>
> one "gotcha" to be careful of - if there is a chance that your id field
will
> have a gap in it (ie. not be perfectly consecutive) then you should make
> your query something like
>
> SELECT * FROM table LIMIT $record, 1
>
> rather than
>
> SELECT * FROM table WHERE id='$record'
>
> Since that takes them in whatever order, but only SELECTs from $record and
> gets 1 record.
>
> HTH
>
> Beau
>
>
> // -Original Message-
> // From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
> // Sent: Monday, 13 May 2002 1:14 PM
> // To: [EMAIL PROTECTED]
> // Subject: [PHP-DB] Link for next db record
> //
> //
> // Hi all,
> //
> // Wondering if you could help or point me to a tut  where I
> // can use a link to
> // get the next record in the db?
> //
> // Like Previous record // href='php.php'>Next record
> //
> // How do I go about doing this.
> //
> // Thanks
> // Jennifer
> //
> // --
> // The sleeper has awaken
> //
> //
> // ---
> // Outgoing mail is certified Virus Free.
> // Checked by AVG anti-virus system (http://www.grisoft.com).
> // Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> //
> //
> //
> // --
> // PHP Database Mailing List (http://www.php.net/)
> // To unsubscribe, visit: http://www.php.net/unsub.php
> //


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Link for next db record

2002-05-12 Thread Beau Lebens

How are you setting the value for $row["rv_space"] ?

// -Original Message-
// From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
// Sent: Monday, 13 May 2002 2:01 PM
// To: [EMAIL PROTECTED]
// Subject: Re: [PHP-DB] Link for next db record
// 
// 
// Hi Beau,
// 
// I have a form that selects an rv electric record here is a 
// snip and if you
// need more tell me.
// This just returns a blank page.
// 
// $current_date = date("M");
// $pkwh =.064;
// $get_electric = "SELECT * FROM electric WHERE rv_space = 
// $row[rv_space]";
// $result = mysql_query($get_electric) or die(mysql_error());
// $row = mysql_fetch_array($result);
// $tot_used = $row[end] - $row[begin];
// $ppkwh = .064;
// $sub_total = $tot_used * $ppkwh;
// $puf = '11';
// $total = $sub_total + $puf;
// echo "Salmon Shores RV Park ";
// echo "Electric Bill for Space $rv_space";
// echo "Month $current_date";
// echo "";
// echo "Space  
// Begin
// EndTotal KWH UsedSubtotalPublic Use
// FeeTotal";
// echo "$rv_space$row[begin]$row[end]$tot_used$sub_total$puf.00$total";
// echo "Return to Main Menu or";
// echo "Previous
// Record";
// echo "Next
// Record";
// echo "Search Another Record";
// 
// I can get the first record say I choose space 35 if I click 
// the link for
// $row[rv_space]+1 then it returns a blank page what can I do 
// to fix this?
// 
// Thanks again
// Jennifer
// 
// 
// "Beau Lebens" <[EMAIL PROTECTED]> wrote in message
// news:[EMAIL PROTECTED].
// edu.au...
// > jen,
// > assuming you are "currently" looking at a page which is 
// something like
// > php.php?record=3, then you should be able to just do
// >
// > Previous record href='php.php'>Next record
// >
// > and then on the php.php page, you would obviously being 
// grabbing something
// > from the database using a unique identifier or similar.
// >
// > one "gotcha" to be careful of - if there is a chance that 
// your id field
// will
// > have a gap in it (ie. not be perfectly consecutive) then 
// you should make
// > your query something like
// >
// > SELECT * FROM table LIMIT $record, 1
// >
// > rather than
// >
// > SELECT * FROM table WHERE id='$record'
// >
// > Since that takes them in whatever order, but only SELECTs 
// from $record and
// > gets 1 record.
// >
// > HTH
// >
// > Beau
// >
// >
// > // -Original Message-
// > // From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
// > // Sent: Monday, 13 May 2002 1:14 PM
// > // To: [EMAIL PROTECTED]
// > // Subject: [PHP-DB] Link for next db record
// > //
// > //
// > // Hi all,
// > //
// > // Wondering if you could help or point me to a tut  where I
// > // can use a link to
// > // get the next record in the db?
// > //
// > // Like Previous record // href='php.php'>Next record
// > //
// > // How do I go about doing this.
// > //
// > // Thanks
// > // Jennifer
// > //
// > // --
// > // The sleeper has awaken
// > //
// > //
// > // ---
// > // Outgoing mail is certified Virus Free.
// > // Checked by AVG anti-virus system (http://www.grisoft.com).
// > // Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
// > //
// > //
// > //
// > // --
// > // PHP Database Mailing List (http://www.php.net/)
// > // To unsubscribe, visit: http://www.php.net/unsub.php
// > //
// 
// 
// ---
// Outgoing mail is certified Virus Free.
// Checked by AVG anti-virus system (http://www.grisoft.com).
// Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
// 
// 
// 
// -- 
// 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] Link for next db record

2002-05-12 Thread Jennifer Downey

This line sets $row["rv_space"]
echo"Search Record by Space Number  ";



"Beau Lebens" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How are you setting the value for $row["rv_space"] ?
>
> // -Original Message-
> // From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
> // Sent: Monday, 13 May 2002 2:01 PM
> // To: [EMAIL PROTECTED]
> // Subject: Re: [PHP-DB] Link for next db record
> //
> //
> // Hi Beau,
> //
> // I have a form that selects an rv electric record here is a
> // snip and if you
> // need more tell me.
> // This just returns a blank page.
> //
> // $current_date = date("M");
> // $pkwh =.064;
> // $get_electric = "SELECT * FROM electric WHERE rv_space =
> // $row[rv_space]";
> // $result = mysql_query($get_electric) or die(mysql_error());
> // $row = mysql_fetch_array($result);
> // $tot_used = $row[end] - $row[begin];
> // $ppkwh = .064;
> // $sub_total = $tot_used * $ppkwh;
> // $puf = '11';
> // $total = $sub_total + $puf;
> // echo "Salmon Shores RV Park ";
> // echo "Electric Bill for Space $rv_space";
> // echo "Month $current_date";
> // echo "";
> // echo "Space 
> // Begin
> // EndTotal KWH UsedSubtotalPublic Use
> // FeeTotal";
> // echo "$rv_space // width='10%'>$row[begin]$row[end] // width='15%'>$tot_used$sub_total // width='12%'>$puf.00$total";
> // echo "Return to Main Menu or";
> // echo " // href='search_elec_space_record.php?record=$row[rv_space]-1'>Previous
> // Record";
> // echo " // href='search_elec_space_record.php?record=$row[rv_space]+1'>Next
> // Record";
> // echo "Search Another Record";
> //
> // I can get the first record say I choose space 35 if I click
> // the link for
> // $row[rv_space]+1 then it returns a blank page what can I do
> // to fix this?
> //
> // Thanks again
> // Jennifer
> //
> //
> // "Beau Lebens" <[EMAIL PROTECTED]> wrote in message
> // news:[EMAIL PROTECTED].
> // edu.au...
> // > jen,
> // > assuming you are "currently" looking at a page which is
> // something like
> // > php.php?record=3, then you should be able to just do
> // >
> // > Previous record // > href='php.php'>Next record
> // >
> // > and then on the php.php page, you would obviously being
> // grabbing something
> // > from the database using a unique identifier or similar.
> // >
> // > one "gotcha" to be careful of - if there is a chance that
> // your id field
> // will
> // > have a gap in it (ie. not be perfectly consecutive) then
> // you should make
> // > your query something like
> // >
> // > SELECT * FROM table LIMIT $record, 1
> // >
> // > rather than
> // >
> // > SELECT * FROM table WHERE id='$record'
> // >
> // > Since that takes them in whatever order, but only SELECTs
> // from $record and
> // > gets 1 record.
> // >
> // > HTH
> // >
> // > Beau
> // >
> // >
> // > // -Original Message-
> // > // From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
> // > // Sent: Monday, 13 May 2002 1:14 PM
> // > // To: [EMAIL PROTECTED]
> // > // Subject: [PHP-DB] Link for next db record
> // > //
> // > //
> // > // Hi all,
> // > //
> // > // Wondering if you could help or point me to a tut  where I
> // > // can use a link to
> // > // get the next record in the db?
> // > //
> // > // Like Previous record // > // href='php.php'>Next record
> // > //
> // > // How do I go about doing this.
> // > //
> // > // Thanks
> // > // Jennifer
> // > //
> // > // --
> // > // The sleeper has awaken
> // > //
> // > //
> // > // ---
> // > // Outgoing mail is certified Virus Free.
> // > // Checked by AVG anti-virus system (http://www.grisoft.com).
> // > // Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> // > //
> // > //
> // > //
> // > // --
> // > // PHP Database Mailing List (http://www.php.net/)
> // > // To unsubscribe, visit: http://www.php.net/unsub.php
> // > //
> //
> //
> // ---
> // Outgoing mail is certified Virus Free.
> // Checked by AVG anti-virus system (http://www.grisoft.com).
> // Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> //
> //
> //
> // --
> // PHP Database Mailing List (http://www.php.net/)
> // To unsubscribe, visit: http://www.php.net/unsub.php
> //


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/20/2002



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php