OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
php-general Digest 15 Sep 2007 18:46:10 -0000 Issue 5020

php-general-digest-helplists.php.net
Date: Sat Sep 15 2007 - 13:46:10 CDT


php-general Digest 15 Sep 2007 18:46:10 -0000 Issue 5020

Topics (messages 262133 through 262138):

Re: $ SERVER["REQUEST URI"] includes domain unexpectedly
        262133 by: Jim Lucas
        262136 by: Greg Donald

split in to multiple pages (I think)
        262134 by: Joker7
        262137 by: Greg Donald

Re: About MYSQL/PHP Shopping Cart's Product Quantity Change Input Forms
        262135 by: tedd

Urgent Help Needed
        262138 by: vingupta3

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


junkrealtechtalk.com 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"
>
>
>
>
>
> Does anyone know a way to change things so the code will not return the
> domain name and whether this is because of PHP or Apache that I'm
> suddenly getting the full domain name?
>
Windows, linux, Sun, etc...

Which version of PHP and Apache (old and new) exactly?

Sounds to me like the new system is running with a DNS redirect.

A friend of mine a month ago or so, had a similar setup.

He was using a DNS redirect to hit the correct page on a IIS server.

Poor mans way of doing virtual hosting.

Am I anywhere close?

--
Jim Lucas

     "Perseverance is not a long race;
         it is many short races one after the other"

Walter Elliot

     "Some men are born to greatness, some achieve greatness,
         and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
     by William Shakespeare

attached mail follows:


On Fri, 14 Sep 2007, junkrealtechtalk.com 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/

attached mail follows:


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

<?

  $max_latest = 5;
 $filename = "articlesum.php";

 #- open article
 if(file_exists($filename)){
  $fh = fopen($filename, "r");
  $old_news = fread($fh, filesize($filename));
  fclose($fh);
 }
 #- get article
 $articles = explode("<!--ARTICLE-->", $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

attached mail follows:


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/

attached mail follows:


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

attached mail follows:


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