[PHP] split in to multiple pages (I think)

2007-09-15 Thread Joker7
Hi,
I'm using the code below to display news articles-which works great apart 
from. I can control the number of articles,but I would like to add a link to 
the bottom of the page to the un-displayed articles ( nexted 5 articles and 
so on) any pointers would be most welcome as most know my PHP skills are not 
the best :).

Cheers
Chris


", $old_news);

 $i=0;
 foreach ( $articles as $article ){
  if(count($articles)>$i){
   if($max_latest >= $i++){
print $article;
   }
  }
 }

?>
-- 
Cheap As Chips Broadband http://yeah.kick-butt.co.uk
Superb hosting & domain name deals http://host.kick-butt.co.uk 

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



Re: [PHP] About MYSQL/PHP Shopping Cart's Product Quantity Change Input Forms

2007-09-15 Thread tedd

At 4:00 PM -0700 9/14/07, Ji H. Park wrote:
*The question: "How would you have multiple text input forms (on 
shopping cart page) with different inputted data (product 
quantities) submitted for querying the database (for changing the 
quantity of multiple products in the shopping cart at the same 
time)?**"*


*Here is an ideal example to clarify the matter:*
When a customer wants to change quantities of multiple products all 
at once in the shopping cart, all the quantities has to be changed 
at the same time just by clicking a button called (e.g. Update 
Quantity).


*Issue*: Currently I have update quantity buttons for each product, 
which isn't convenient.


I would appreciate any tips, techniques, comments, or reference to 
any website regarding this issue at your repository, thanks!



In addition to what others have said, use javascript to adjust 
quantities and cost until the user wants to submit like so:


http://webbytedd.com/c/form-calc/

There's little reason to make the user click "Update Quantity" 
repeatedly before the user is finished with his/her order IF you are 
offering several items -- like found in a shopping cart.


After the user clicks submit, then use php to make sure the data is 
what you expect.


Cheers,

tedd

--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

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



Re: [PHP] $ SERVER["REQUEST URI"] includes domain unexpectedly

2007-09-15 Thread Greg Donald
On Fri, 14 Sep 2007, [EMAIL PROTECTED] wrote:
> In my old server running Apache 1.3 and PHP 4 this code will return just the
> URI as expected:
>
> $_SERVER["REQUEST_URI"] = "/some-html-file.html"
>
> In my new server with Apache 2 & PHP 4 this code returns the domain:
>
> $_SERVER["REQUEST_URI"] = "/full-domain-name.com/some-html-file.html"

basename() will assist you in getting the last part of the
$_SERVER['REQUEST_URI'] path.. seems like that's what you're after.

http://php.net/basename


-- 
Greg Donald
Cyberfusion Consulting
http://cyberfusionconsulting.com/

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



Re: [PHP] split in to multiple pages (I think)

2007-09-15 Thread Greg Donald
On Sat, 15 Sep 2007, Joker7 wrote:
> I'm using the code below to display news articles-which works great apart
> from. I can control the number of articles,but I would like to add a link to
> the bottom of the page to the un-displayed articles ( nexted 5 articles and
> so on) any pointers would be most welcome as most know my PHP skills are not
> the best :).

There's a bunch of how-tos and discussion on this topic already:

http://google.com/search?q=php+pagination

You have to manage a variable across page requests to keep track of
where you are.  Use that variable in your SQL as part of your
offset/limit parameters.


-- 
Greg Donald
Cyberfusion Consulting
http://cyberfusionconsulting.com/

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



[PHP] Urgent Help Needed

2007-09-15 Thread vingupta3
Hi,
  Its been a whiling i am searching for "Sync Outlook
with MySQL via PHP". 

I want to synchronize Calendar events and Contacts
from Outlook with MySQL via PHP. 

Can you help me with it..

a very thanks in advance!


~Vinay



   

Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC

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



Re: [PHP] Urgent Help Needed

2007-09-15 Thread Stut

vingupta3 wrote:

  Its been a whiling i am searching for "Sync Outlook
with MySQL via PHP". 


I want to synchronize Calendar events and Contacts
from Outlook with MySQL via PHP. 


Can you help me with it..


http://php.net/com

Here endeth the PHP involvement. Look up the Outlook COM objects in the 
MSDN documentation for help with those.



a very thanks in advance!


A very you're welcome on time.

-Stut

--
http://stut.net/

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