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 9 Jul 2004 21:18:48 -0000 Issue 2867

php-general-digest-helplists.php.net
Date: Fri Jul 09 2004 - 16:18:48 CDT


php-general Digest 9 Jul 2004 21:18:48 -0000 Issue 2867

Topics (messages 190041 through 190110):

Re: Creating Rows and Columns Using for() Loops
        190041 by: Rory McKinley

help to generate codebars
        190042 by: Vicente Vives
        190044 by: Aidan Lister

Re: Slideshow using PHP
        190043 by: Jason Merrique
        190080 by: Justin Patrin

help to generate barcodes
        190045 by: Vicente Vives
        190049 by: Ewout

Re: Session_Start Problem (Fatal Error)
        190046 by: Aidan Lister

Re: How to handle cookies?
        190047 by: Aidan Lister
        190062 by: Matt M.

PHP Redirection If Login Fails.
        190048 by: Harlequin
        190051 by: Harlequin
        190054 by: Jason Wong
        190057 by: Harlequin

Retrieving Database Data For Users To Edit
        190050 by: Harlequin
        190053 by: Jay Blanchard
        190081 by: Justin Patrin

odbc_exec
        190052 by: mistknight

Re: PHP Hosting
        190055 by: John Nichel
        190056 by: Adam Voigt
        190058 by: Michael Gale
        190064 by: Alex Hogan
        190065 by: raditha dissanayake
        190072 by: Sam Masiello

Retrieving Data To Edit
        190059 by: Harlequin
        190060 by: André Ventura Lemos
        190061 by: Jay Blanchard
        190066 by: Torsten Roehr
        190067 by: Harlequin
        190068 by: Harlequin
        190069 by: Jay Blanchard
        190070 by: Daniel Kullik
        190078 by: Matthew Sims

Re: PHP and windows authentication
        190063 by: raditha dissanayake

Page Loading Problem
        190071 by: Bob
        190073 by: Matt M.

gzip compression verification
        190074 by: Daniel Guerrier
        190075 by: raditha dissanayake
        190077 by: Willem Bison
        190082 by: Jason Wong

Re: fopen with login credentials being an email address
        190076 by: Justin Patrin
        190084 by: Gunter Sammet
        190085 by: Gunter Sammet
        190086 by: Justin Patrin
        190087 by: raditha dissanayake

Re: Got a problem with Slashes on my CMS
        190079 by: Justin Patrin

eregi_replace driving me nuts
        190083 by: Michael.Thanry.fr.aisc.com

basic web based test code needed to test database tables!!!!!
        190088 by: bruce
        190089 by: Justin Patrin
        190093 by: bruce

problem with downloading some pdf's
        190090 by: Scott Taylor
        190092 by: Justin Patrin
        190097 by: Tim Van Wassenhove

Re: Emulating sprintf???
        190091 by: Gerard Samuel

eregi_replace()
        190094 by: John Taylor-Johnston
        190098 by: Matt M.
        190099 by: John Taylor-Johnston
        190103 by: Matt M.
        190110 by: John Taylor-Johnston

PHP Include not Working Correctly
        190095 by: Harlequin
        190096 by: Thomas Seifert

after submitting, working with data on same page
        190100 by: Hull, Douglas D
        190102 by: Daniel Guerrier
        190104 by: Matt M.

Any suggestion for my php project?
        190101 by: xin
        190105 by: Ed Lazor

after suubmitting, working with data on same page
        190106 by: Hull, Douglas D
        190107 by: Marek Kilimajer
        190108 by: Hull, Douglas D
        190109 by: Marek Kilimajer

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:


php-listxenonsolutions.com wrote:

><snip>
>|--------------------------|--------------------------|---------------------
>-----|
> | MON JUL 5 | TUE JUL 6 | etc...
>|
>-----|--------|--------------------------|--------------------------|-------
>-------------------|--------|-----|
>Rm # |Rm Type | First Name | Last Name | First Name | Last Name | etc...
>|Rm Type |Rm # |
>-----|--------|--------------------------|--------------------------|-------
>-------------------|--------|-----|
>101 | NQQ | Isaac Newton | (empty room) | etc...
>| NQQ |101 |
>-----|--------|--------------------------|--------------------------|-------
>-------------------|--------|-----|
>102 | NK | Alexander Flemming | Alexander Flemming | etc...
>| NK |102 |
>-----|--------|--------------------------|--------------------------|-------
>-------------------|--------|-----|
>103 | K | Charles Darwin | Robert Kennedy | etc...
>| K |103 |
>-----|--------|--------------------------|--------------------------|-------
>-------------------|--------|-----|
>104 | QQ | Roger Rabbit | (empty room) | etc...
>| QQ |104 |
>-----|--------|--------------------------|--------------------------|-------
>-------------------|--------|-----|
>... | ... | ... etc | ... etc | etc...
>| ... |... |
>-----|--------|--------------------------|--------------------------|-------
>-------------------|--------|-----|
>
>
>
>
<snip>

Hi

I know this not what you asked and please feel free to tell me to mind
my own business, but a more useful design for your DB would be something
like this:

Table : rooms
Fields: room_number (PK), room_type

Table: Customers
Fields: customer_id (PK, autoincrement), first_name, last_name, etc, etc

Table: bookings
Fields: room_number, booking_date, customer_id - PK(room_number, date)

In the short term, changing your db will be a bit of a pain cos of the
code rework, but the db design will be more scalable and more useful in
the long run. To get the display that you required you can do something
like this - assuming that you want a seven day span starting from today
(for example) - showing only the first two days

$query = SELECT a.room_number, a.room_type, IFNULL(CONCAT_WS(" ",
b.first_name, b.last_name), "Empty Room"), d.room_number, d.room_type,
IFNULL(CONCAT_WS(" ", e.first_name, e.last_name), "Empty Room")
FROM rooms a LEFT JOIN bookings c ON a.room_number = c.room_number AND
c.booking_date = "2004-07-09", customers b, rooms d LEFT JOIN bookings f
ON d.room_number = f.room_number AND f.booking_date = "2004-07-10",
customers e
WHERE b.customer_id = c.customer_id AND e.customer_id = f.customer_id

You will still have to add more code for the other five days, but if you
want to be really clever and save wear and tear on your keyboard you can
build the query dynamically using a loop...

You don't have to use a query this complicated, but if you do, you shift
the bulk of the data processing and arranging to the DB (which does it a
lot more efficiently than PHP). Then you just have to use PHP to create
the table, the relevant headings and to populate the cells.

Ok, I am finished sticking my oar in...

Rory

    

attached mail follows:


Hello everybody,

I'm looking for a way to generate codebars from the web. I found some
ActiveX for ASP but i want to generate them using PHP :-)

Do you know how?
Do you know any library to do it?

Thanks a lot.

Vicente Vives.

attached mail follows:


What is a codebar?

"Vicente Vives" <vvivesaimplas.es> wrote in message
news:40EE6665.5010008aimplas.es...
> Hello everybody,
>
> I'm looking for a way to generate codebars from the web. I found some
> ActiveX for ASP but i want to generate them using PHP :-)
>
> Do you know how?
> Do you know any library to do it?
>
>
>
> Thanks a lot.
>
>
>
> Vicente Vives.

attached mail follows:


Hi Todd,

Just had an idea - not sure if it will work.

Can you make PHP send data as it becomes available?

Given that the pictures are all the same size, and there aren't too many
of them, a 'for' loop would do it:

for ($i = 1; $i <= 10; $i++)
{
        echo layer containing the picture i with z-index i;
        Wait;
}

Etc...

That way the pictures would be stacked on top of each other.

Is this possible?

Cheers,

Jason

> -----Original Message-----
> From: Matthew Sims [mailto:mattkillermookie.org]
> Sent: 08 July 2004 17:18
> To: php-generallists.php.net
> Subject: Re: [PHP] Re: Slideshow using PHP
>
> > I do have a JavaScript based "SlideShow", however, I would
> like to use
> > PHP rather than JavaScript. Is there a way to "loop" with PHP and
> > "display" an image without re-displaying the whole page?
> >
> > Todd
>
> To get a good slideshow you'll need to use client side
> instructions, aka javascript. You're probably not going to
> get it to work so well using PHP which is server side instructions.
>
> Part of getting the slideshow to work is making the browser
> switch to the next image and well, PHP doesn't really make
> the browser do anything.
>
> --Matthew Sims
> --<http://killermookie.org>
>
> --
> PHP General Mailing List (http://www.php.net/) To
> unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


You can use flush() for that, but the webserver, any intermediate
caches, and the browser may cache the data before it gets displayed.
You're much better off using JS to change the src of an img every n
seconds.

On Fri, 9 Jul 2004 10:47:04 +0100, Jason Merrique
<j.merriqueretroscreen.com> wrote:
> Hi Todd,
>
> Just had an idea - not sure if it will work.
>
> Can you make PHP send data as it becomes available?
>
> Given that the pictures are all the same size, and there aren't too many
> of them, a 'for' loop would do it:
>
> for ($i = 1; $i <= 10; $i++)
> {
> echo layer containing the picture i with z-index i;
> Wait;
> }
>
> Etc...
>
> That way the pictures would be stacked on top of each other.
>
> Is this possible?
>
> Cheers,
>
> Jason
>
> > -----Original Message-----
> > From: Matthew Sims [mailto:mattkillermookie.org]
> > Sent: 08 July 2004 17:18
> > To: php-generallists.php.net
> > Subject: Re: [PHP] Re: Slideshow using PHP
> >
> > > I do have a JavaScript based "SlideShow", however, I would
> > like to use
> > > PHP rather than JavaScript. Is there a way to "loop" with PHP and
> > > "display" an image without re-displaying the whole page?
> > >
> > > Todd
> >
> > To get a good slideshow you'll need to use client side
> > instructions, aka javascript. You're probably not going to
> > get it to work so well using PHP which is server side instructions.
> >
> > Part of getting the slideshow to work is making the browser
> > switch to the next image and well, PHP doesn't really make
> > the browser do anything.
> >
> > --Matthew Sims
> > --<http://killermookie.org>
> >
> > --
> > PHP General Mailing List (http://www.php.net/) To
> > unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> !DSPAM:40ee65d3246611030617968!
>
>

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


Hello everybody,

I'm looking for a way to generate barcodes from the web. I found some
ActiveX for ASP but i want to generate them using PHP :-)

Do you know how?
Do you know any library to do it?

Thanks a lot.

Vicente Vives.

attached mail follows:


----- Original Message -----
From: "Vicente Vives" <vvivesaimplas.es>
To: <php-generallists.php.net>
Sent: Friday, July 09, 2004 11:42 AM
Subject: [PHP] help to generate barcodes

> Hello everybody,
>
> I'm looking for a way to generate barcodes from the web. I found some
> ActiveX for ASP but i want to generate them using PHP :-)
>
> Do you know how?
> Do you know any library to do it?

Look here:

http://pear.php.net/package/Image_Barcode

regards,
Ewout

attached mail follows:


Did you look on the mambo forums as suggested?

<webmasterjnsolutions.co.uk> wrote in message
news:1089361151.40ee54fff1b3djnsolutions.co.uk...
> I'm using Mambo Open Source CMS to run a site I'm building, and seem to
have a
> problem logging into the Administration Tool. It comes up with:
>
> Fatal error: session_start(): Failed to initialize storage module. in
> /home/hetbweb/public_html/administrator/index.php on line 64
>
> I've looked at various things that could cause this, and finally contacted
my
> server support who said:
> "It's a PHP bug which they still havent fixed as of yet, as soon as the
fix
> becomes available we will update PHP.
> It may be worth looking on the mambo forums as there may be a patch to
resolve
> this for your script."
>
> Does anyone know about this, and if so, is there a fix or work around or
> anything?!!!!
>
> Cheers
> Nunners

attached mail follows:


Try cURL,

http://php.net/curl

"Martin Schneider" <cangoouyahoo.de> wrote in message
news:20040709081306.65912.qmailpb1.pair.com...
> Hello! I want to use php to gather some informations on a website. You
> have to login to this website. In a brwoser, a cookie is set at login
> and identifies you.
>
> How can I handle this cookie when using php? Is there an easy way? It
> would be best just to use fopen("http://...").
>
> Martin

attached mail follows:


> How can I handle this cookie when using php? Is there an easy way? It
> would be best just to use fopen("http://...").

http://pear.php.net/package/HTTP_Client

attached mail follows:


Hi all I've created a page that allows registered users who have previously
registered and been entered into the database to login. However, for some
reason if a user login fails my code does not display the appropriate error
message.

Ideally I would like the users to be redirected to another page rather than
the login page if they fail but I need some help with the code.

Anyone...?

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------

attached mail follows:


Here's the code in question: I'd ideally want the user to only be directed
to this page if login is successful. Directed to another page if
unsuccessful but even the error messages do not display which I find
strange...

/* Verify Login */
  $sql = "SELECT UserFirstName,UserID,UserPassword,FurtherComments FROM
RegisteredMembers
     WHERE UserID='$_POST[TXT_UserID]'";
  $result = mysql_query($sql) or die ("could not select database");
  $num = mysql_num_rows($result);
  if ($num == 1) //Login Name Was Found
  {
   $sql = "SELECT UserID FROM RegisteredMembers
      WHERE UserID='$_POST[TXT_UserID]'
        AND UserPassword=('$_POST[TXT_UserPassword]')";
   $result2 = mysql_query($sql) or die("Couldn't execute query #2. MySQL
Error: " . mysql_error());
   $num2 = mysql_num_rows($result2);
   if ($num2 > 0) // password is correct
       {
          $_SESSION['auth']="yes";
            $logname=$_POST['TXT_UserID'];
            $_SESSION['logname'] = $logname;
            $today = date("Y-m-d h:m:s");
            $sql = "INSERT INTO Logon (loginName,loginTime)
            VALUES ('$logname','$today')";
            mysql_query($sql) or die("Couldn't execute query. MySQL Error: "
. mysql_error());
      }
   else // password is not correct
       {
          unset($do);
        $message="The Login Name, '$_POST[TXT_UserID]'
            exists, but you have not entered the correct password! Please
try again.<br>";
       }
   }
   elseif ($num == 0) // login name not found
       {
    unset($do);
       $message = "The Login Name you entered does not exist! Please try
again.<br>";
      }

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Harlequin" <michael.masonarraspeople.co.uk> wrote in message
news:20040709095425.15354.qmailpb1.pair.com...
> Hi all I've created a page that allows registered users who have
previously
> registered and been entered into the database to login. However, for some
> reason if a user login fails my code does not display the appropriate
error
> message.
>
> Ideally I would like the users to be redirected to another page rather
than
> the login page if they fail but I need some help with the code.
>
> Anyone...?
>
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------

attached mail follows:


On Friday 09 July 2004 18:37, Harlequin wrote:
> Here's the code in question: I'd ideally want the user to only be directed
> to this page if login is successful. Directed to another page if
> unsuccessful but even the error messages do not display which I find
> strange...

[snip]

> else // password is not correct
> {
> unset($do);
> $message="The Login Name, '$_POST[TXT_UserID]'
> exists, but you have not entered the correct password! Please
> try again.<br>";

Do you actually print/echo $message elsewhere in your code? In the code you
posted, I can only see it being assigned by not actually used.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
When the bosses talk about improving productivity, they are never talking
about themselves.
*/

attached mail follows:


Thanks Jason. I think that's where I was falling down with this one.

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Jason Wong" <php-generalgremlins.biz> wrote in message
news:200407092003.47378.php-generalgremlins.biz...
> On Friday 09 July 2004 18:37, Harlequin wrote:
> > Here's the code in question: I'd ideally want the user to only be
directed
> > to this page if login is successful. Directed to another page if
> > unsuccessful but even the error messages do not display which I find
> > strange...
>
> [snip]
>
> > else // password is not correct
> > {
> > unset($do);
> > $message="The Login Name, '$_POST[TXT_UserID]'
> > exists, but you have not entered the correct password!
Please
> > try again.<br>";
>
> Do you actually print/echo $message elsewhere in your code? In the code
you
> posted, I can only see it being assigned by not actually used.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> When the bosses talk about improving productivity, they are never talking
> about themselves.
> */

attached mail follows:


Hi again.

I'm currently trawling through PHP and MySQL forums and web pages trying to
find some starting point for the above.

In essence what I want to do is once a user is logged in (which I have
cracked) display their information for them to edit. Such things as user's
password, some text fields etc.

Any suggestions on code or where I can find such code...?

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------

attached mail follows:


[snip]
Any suggestions on code or where I can find such code...?
[/snip]

Sseach Google for PHP tutorials, several dozen of them discuss
retrieving data from databases.

attached mail follows:


On Fri, 9 Jul 2004 11:04:05 +0100, Harlequin
<michael.masonarraspeople.co.uk> wrote:
> Hi again.
>
> I'm currently trawling through PHP and MySQL forums and web pages trying to
> find some starting point for the above.
>
> In essence what I want to do is once a user is logged in (which I have
> cracked) display their information for them to edit. Such things as user's
> password, some text fields etc.
>
> Any suggestions on code or where I can find such code...?
>

DB_DataObject_FormBuilder (see my signiature) can create forms for you
from any DB table. You can then use its many options to customize the
form (like using a password field instead of a text field, etc.).
Don't hesitate to ask for help if you need it.

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


I'm having trouble executing queries using odbc. Here's what I use:
 
 define("NEED_REPLY", true);
 $con = 0;
 
 function con()
 {
  $con = odbc_connect("rest","DBA","SQL");
  odbc_autocommit($con, true);
 }
 function query($query, $reply_expected = false)
 {
  $reply = odbc_exec($con, $query);
  if ($reply_expected == true)
   return $reply;
 }
 
 $query = "select * from user";
 $result = query($query, NEED_REPLY);
 while ($row = odbc_fetch_array($result))
 {
  echo "<REPLY>".$row["username"]."</REPLY>";
 }
 
I get:
 
Warning: odbc_exec(): supplied argument is not a valid ODBC-Link resource in c:\inetpub\wwwroot\HakayaFiles\sybase.php on line 13

Warning: odbc_fetch_array(): supplied argument is not a valid ODBC result resource in c:\inetpub\wwwroot\HakayaFiles\query.php on line 7

Please HELP!

                
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.

attached mail follows:


Curt Zirzow wrote:
> * Thus wrote Ed Lazor:
>
>>Hey, does anyone have experience hosting PHP / MySQL apps on EV1servers.net,
>>ServerBeach.net, or CIhost.com? I'm looking for value, reliability, and
>>quality support. Any other recommendations are also greatly appreciated.
>
>
> Out of 1000's of solutions I'd probably suggest:
>
> pair.com
>
> They operate on the *proper* OS :)
>
> Curt

*throws a grenade because it's a slow Friday*

Bah!!!! That watered down OS X excuse for an OS?!?!?! I refuse to use
any hosting company that isn't running Windows 3.1. ;)

*and let the flamewar begin*

--
John C. Nichel
KegWorks.com
716.856.9675
johnkegworks.com

attached mail follows:


> Curt Zirzow wrote:
> > * Thus wrote Ed Lazor:
> >
> >>Hey, does anyone have experience hosting PHP / MySQL apps on EV1servers.net,
> >>ServerBeach.net, or CIhost.com? I'm looking for value, reliability, and
> >>quality support. Any other recommendations are also greatly appreciated.

http://www.spenix.com

Very good prices, very good support.

--

Adam Voigt
adamkotisprop.com

attached mail follows:


Don't you require Windows 3.1.11 for proper network support :) - at least 3.1 was stable.

*continue flawewar"

Michael.

On Fri, 09 Jul 2004 08:48:00 -0400
John Nichel <johnkegworks.com> wrote:

> Curt Zirzow wrote:
> > * Thus wrote Ed Lazor:
> >
> >>Hey, does anyone have experience hosting PHP / MySQL apps on EV1servers.net,
> >>ServerBeach.net, or CIhost.com? I'm looking for value, reliability, and
> >>quality support. Any other recommendations are also greatly appreciated.
> >
> >
> > Out of 1000's of solutions I'd probably suggest:
> >
> > pair.com
> >
> > They operate on the *proper* OS :)
> >
> > Curt
>
> *throws a grenade because it's a slow Friday*
>
> Bah!!!! That watered down OS X excuse for an OS?!?!?! I refuse to use
> any hosting company that isn't running Windows 3.1. ;)
>
> *and let the flamewar begin*
>
> --
> John C. Nichel
> KegWorks.com
> 716.856.9675
> johnkegworks.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>

--
Michael Gale
Network Administrator
Utilitran Corporation

attached mail follows:


> Don't you require Windows 3.1.11 for proper network support
> :) - at least 3.1 was stable.

Poke fun all you want..,

Everyone knows the real OS was Warp! ;-)

*onward flamewar soldiers*

alex hogan
*************************************************************************************
The contents of this e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom it is addressed. The
views stated herein do not necessarily represent the view of the company. If you are
not the intended recipient of this e-mail you may not copy, forward, disclose, or
otherwise use it or any part of it in any form whatsoever. If you have received this
e-mail in error please e-mail the sender.
*************************************************************************************

attached mail follows:


Louie Miranda wrote:

>check out http://www.webhostingtalk.com
>
>
Before you sign up type in the company name into the searchbox at
webhostingtalk, follow up by doing the same at google. Recently I
ordered a dedicated server without botherhing with these steps and and i
have been wrongfully billed for $200+ you can find the full story here:
http://www.raditha.com/blog/archives/000446.html

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


I think you mean GEOS :)

--Sam

 

-----Original Message-----
From: Alex Hogan [mailto:Alex.Hoganalliedelec.com]
Sent: Friday, July 09, 2004 8:15 AM
To: php-generallists.php.net
Subject: RE: [PHP] PHP Hosting

> Don't you require Windows 3.1.11 for proper network support
> :) - at least 3.1 was stable.

Poke fun all you want..,

Everyone knows the real OS was Warp! ;-)

*onward flamewar soldiers*

alex hogan
************************************************************************
*************
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or entity
to whom it is addressed. The views stated herein do not necessarily
represent the view of the company. If you are not the intended recipient
of this e-mail you may not copy, forward, disclose, or otherwise use it
or any part of it in any form whatsoever. If you have received this
e-mail in error please e-mail the sender.
************************************************************************
*************

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

attached mail follows:


This is really confusing and I'm sure very simple to achieve.

I already have values selected that I want to open and edit:

$sql = "SELECT * FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'";

I basically want to recall these values on screen for the user to edit
themselves. Once I've achieved that I'm assuming that I simply use an INSERT
command but need to achieve the first step first of calling the data up...

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------

attached mail follows:


Just put a <form> with the value="" bits having the values you want the
user to edit.

On Fri, 2004-07-09 at 14:39, Harlequin wrote:
> This is really confusing and I'm sure very simple to achieve.
>
> I already have values selected that I want to open and edit:
>
> $sql = "SELECT * FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'";
>
> I basically want to recall these values on screen for the user to edit
> themselves. Once I've achieved that I'm assuming that I simply use an INSERT
> command but need to achieve the first step first of calling the data up...
>
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------
--
I/O, I/O,
It's off to disk I go,
A bit or byte to read or write,
I/O, I/O, I/O...

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBA7qGJduWuN7ka4fkRAk8KAKDCPWUWOXp264dlYIdWQHUdGSR7RQCfbx4Y
hfHnxIS5mOFwG9SrgugtAVc=
=bw69
-----END PGP SIGNATURE-----

attached mail follows:


[snip]
This is really confusing and I'm sure very simple to achieve.

I already have values selected that I want to open and edit:

$sql = "SELECT * FROM RegisteredMembers WHERE
UserID='$_POST[TXT_UserID]'";

I basically want to recall these values on screen for the user to edit
themselves. Once I've achieved that I'm assuming that I simply use an
INSERT
command but need to achieve the first step first of calling the data
up...
[/snip]

Have you looked at any of the tutorials yet? A basic tutorial you will
be able to walk through in about an hour. You would want to use an
UPDATE for edited items, INSERT is for new items.

http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.
html

attached mail follows:


"Harlequin" <michael.masonarraspeople.co.uk> wrote in message
news:20040709133858.22918.qmailpb1.pair.com...
> This is really confusing and I'm sure very simple to achieve.
>
> I already have values selected that I want to open and edit:
>
> $sql = "SELECT * FROM RegisteredMembers WHERE
UserID='$_POST[TXT_UserID]'";

Hi,

please put quotes around your array keys:
$_POST[TXT_UserID] => $_POST['TXT_UserID']

Regards, Torsten

>
> I basically want to recall these values on screen for the user to edit
> themselves. Once I've achieved that I'm assuming that I simply use an
INSERT
> command but need to achieve the first step first of calling the data up...
>
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------

attached mail follows:


I'm getting closer...!

I SELECT:

  $sql = "SELECT UserFirstName FROM RegisteredMembers WHERE
UserID='$_POST[TXT_UserID]'";
  $result5 = mysql_query($sql) or die ("error: couldn't select UserID from
database. Please e-mail: business.supportarraspeople.co.uk with this error
message.");
    while($row = mysql_fetch_array($result5))
  {
  $User=$row["UserFirstName"];
  $UserFurtherComments=$row["FurtherComments"];
  }

I then use a form:

    echo "<tr>";
    echo "<td>a little about me:</td>";
    echo "<td><input type = 'text' name = 'TXT_FurtherComments'
value='FurtherComments field should appear here'></td>";
    echo "<td>20 characters max</td>";
    echo "</tr>";

But if is use "value='$UserFurtherComments' nothing appears in the form
field, even though the database holds a value in that field.

What am I doing wrong...?

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Harlequin" <michael.masonarraspeople.co.uk> wrote in message
news:20040709133858.22918.qmailpb1.pair.com...
> This is really confusing and I'm sure very simple to achieve.
>
> I already have values selected that I want to open and edit:
>
> $sql = "SELECT * FROM RegisteredMembers WHERE
UserID='$_POST[TXT_UserID]'";
>
> I basically want to recall these values on screen for the user to edit
> themselves. Once I've achieved that I'm assuming that I simply use an
INSERT
> command but need to achieve the first step first of calling the data up...
>
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------
>

attached mail follows:


Yes and thanks very much for the post. I've been trying to use some of the
examples on that site but just can't seem to get it to work right.

I've posted a reply to my own thread "below" I'd really appreciate any input
you can provide.

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------
"Jay Blanchard" <jay.blanchardniicommunications.com> wrote in message
news:C8F323573C030A448F3E5A2B6FE2070B035226C3nemesis...
[snip]
This is really confusing and I'm sure very simple to achieve.

I already have values selected that I want to open and edit:

$sql = "SELECT * FROM RegisteredMembers WHERE
UserID='$_POST[TXT_UserID]'";

I basically want to recall these values on screen for the user to edit
themselves. Once I've achieved that I'm assuming that I simply use an
INSERT
command but need to achieve the first step first of calling the data
up...
[/snip]

Have you looked at any of the tutorials yet? A basic tutorial you will
be able to walk through in about an hour. You would want to use an
UPDATE for edited items, INSERT is for new items.

http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.
html

attached mail follows:


[snip]
  $sql = "SELECT UserFirstName FROM RegisteredMembers WHERE
UserID='$_POST[TXT_UserID]'";
[/snip]

please change
$sql = "SELECT UserFirstName FROM RegisteredMembers WHERE
UserID='$_POST[TXT_UserID]'";

to the proper syntax of
$sql = "SELECT UserFirstName FROM RegisteredMembers WHERE
UserID='" . $_POST['TXT_UserID'] . "' ";

[snip]
    echo "<tr>";
    echo "<td>a little about me:</td>";
    echo "<td><input type = 'text' name = 'TXT_FurtherComments'
value='FurtherComments field should appear here'></td>";
    echo "<td>20 characters max</td>";
    echo "</tr>";
[/snip]

    echo "<td><input type = 'text' name = 'TXT_FurtherComments'
value='FurtherComments field should appear here'></td>";

should be

    echo "<td><input type = \"text\" name = \"TXT_FurtherComments\"
value=\" $UserFurtherComments\"></td>";

attached mail follows:


Harlequin wrote:

> This is really confusing and I'm sure very simple to achieve.
>
> I already have values selected that I want to open and edit:
>
> $sql = "SELECT * FROM RegisteredMembers WHERE UserID='$_POST[TXT_UserID]'";
>
> I basically want to recall these values on screen for the user to edit
> themselves. Once I've achieved that I'm assuming that I simply use an INSERT
> command but need to achieve the first step first of calling the data up...
>

Did you define a constant named 'TXT_UserID'?
If 'TXT_UserID' is the name of a form-element you might try this instead
of your posted line of code:

[code]
$sql = sprintf(
   'SELECT * FROM RegisteredMembers WHERE UserID = "%s"',
   $_POST['TXT_UserID']
);
[/code]

(So maybe you just forgot some quotation-marks (-:)

Daniel

--
WWE e-commerce IT GmbH
Eiffestrasse 462, D-20537 Hamburg
Tel.: +49-40-2530659-0, Fax: +49-40-2530659-50

attached mail follows:


> I'm getting closer...!
>
> I SELECT:
>
> $sql = "SELECT UserFirstName FROM RegisteredMembers WHERE
> UserID='$_POST[TXT_UserID]'";
> $result5 = mysql_query($sql) or die ("error: couldn't select UserID from
> database. Please e-mail: business.supportarraspeople.co.uk with this
> error
> message.");
> while($row = mysql_fetch_array($result5))
> {
> $User=$row["UserFirstName"];
> $UserFurtherComments=$row["FurtherComments"];
> }
>
> I then use a form:
>
> echo "<tr>";
> echo "<td>a little about me:</td>";
> echo "<td><input type = 'text' name = 'TXT_FurtherComments'
> value='FurtherComments field should appear here'></td>";
> echo "<td>20 characters max</td>";
> echo "</tr>";
>
> But if is use "value='$UserFurtherComments' nothing appears in the form
> field, even though the database holds a value in that field.
>
> What am I doing wrong...?
>
> --
> -----------------------------
> Michael Mason

Do you need to use a while loop? If you're expecting only 1 query result
from the database, skip the while loop and simply use:

<?php
...
$row = mysql_fetch_array($result5);
?>

<td>
<input type = 'text' name = 'TXT_FurtherComments' value='<?php echo
$row['UserFirstName']; ?>'>
</td>

If more than 1 result is expected, move your while loop to here:

<table>
<?php while ($row = mysql_fetch_array($result5)) { ?>
  <tr>
  <td>a little about me:</td>
  <td><input type = 'text' name = 'TXT_FurtherComments' value='<?php echo
$row['UserFirstName']; ?>'></td>
  <td>20 characters max</td>
  </tr>
<?php } ?>
</table>

And one last thing, you $_POST is set wrong:
$_POST['TXT_UserID']

--Matthew Sims
--<http://killermookie.org>

attached mail follows:


Roman Duriancik wrote:

> I have problem with open file by fopen function on windows servers.
> I need open some file in windows server, from php script but is it
> possible that this script running
> on some user windows account ?
>
> example :
> fopen("\\\\server\\data1\\text.txt","r");
> system send me this error message : *Warning*:
> fopen(\\server\data1\text.txt): failed to open stream: Permission
> denied in *fopen.php.*

The webserver user probably does not have access network shares and if
you are on windows you add it permission at your peril

>
> roman
>

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


Hello all

I bring up a browser and try and go to my index.php for the first time and
all I receive back in the broswer is a blank page. This is the test from
the view source

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

Then, once you hit refresh, the page displays properly and keeps
displaying properly until I close the browser and restart it. The blank
page only happens the first time the browser is started.

This appears in the access_log for that page

  - - [09/Jul/2004:14:30:52 -0400] "GET /index.php HTTP/1.1" 200 5

Anyone have any ideas why this happens???

attached mail follows:


> Anyone have any ideas why this happens???

You have any code examples?

attached mail follows:


I've enabled gzip compression of pages on my site.
The question is, how do I check the size of the page
being sent to verify that the page is being
compressed.

Danny

                
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

attached mail follows:


Daniel Guerrier wrote:

>I've enabled gzip compression of pages on my site.
>The question is, how do I check the size of the page
>being sent to verify that the page is being
>compressed.
>
>
pages will not always be compressed - they are delivered in compressed
format only when the browser is willing to accept it that way.
You can always find the number of bytes delivered by looking at the log
file.

>
>

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


> I've enabled gzip compression of pages on my site.
> The question is, how do I check the size of the page being
> sent to verify that the page is being compressed.

Check log of webserver; bytes sent is shown there.

attached mail follows:


On Friday 09 July 2004 23:12, Daniel Guerrier wrote:
> I've enabled gzip compression of pages on my site.
> The question is, how do I check the size of the page
> being sent to verify that the page is being
> compressed.

You can use an old version of Netscape (4.7X). If you view source of a
compressed page that is exactly what you see - the compressed source ;)

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
"I don't think so," said Ren'e Descartes. Just then, he vanished.
*/

attached mail follows:


Try using urlencode on the e-mail address.

On Thu, 8 Jul 2004 23:30:33 -0600, Gunter Sammet
<guntersammysolutions.com> wrote:
> Hi all:
> Tried to use fopen like this:
>
> fopen(mynamemydomain.com:mypasswordsubdomain.maindomain.com);
>
> Didn't work and I couldn't find anything out on the search engines.
>
> Any suggestions how to get this working?
>
> TIA
>
> Gunter
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> !DSPAM:40ee2b89115861429779826!
>
>

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


I tried that before manually with %40 and it didn't work. It's now valid but
Apache seems to not recognize the login credentials and sends me to the
login page. And that's the one I need to skip.

Thanks!

G.

"Justin Patrin" <papercranegmail.com> wrote in message
news:432beae0407090825382deaf1mail.gmail.com...
> Try using urlencode on the e-mail address.
>
> On Thu, 8 Jul 2004 23:30:33 -0600, Gunter Sammet
> <guntersammysolutions.com> wrote:
> > Hi all:
> > Tried to use fopen like this:
> >
> > fopen(mynamemydomain.com:mypasswordsubdomain.maindomain.com);
> >
> > Didn't work and I couldn't find anything out on the search engines.
> >
> > Any suggestions how to get this working?
> >
> > TIA
> >
> > Gunter
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > !DSPAM:40ee2b89115861429779826!
> >
> >
>
>
> --
> DB_DataObject_FormBuilder - The database at your fingertips
> http://pear.php.net/package/DB_DataObject_FormBuilder
>
> paperCrane --Justin Patrin--

attached mail follows:


Yes I had quotes. And you're right the interpretation of the URL is as you
laid it out.

Unfortunatelly I don't have control on the login credentials. Tried %40 to
replace the but then it won't be accepted as a login.

Thanks for your reply!

G.

"Curt Zirzow" <php-generalzirzow.dyndns.org> wrote in message
news:20040709062953.GV99175bagend.shire...
> * Thus wrote Gunter Sammet:
> > Hi all:
> > Tried to use fopen like this:
> >
> > fopen(mynamemydomain.com:mypasswordsubdomain.maindomain.com);
>
> I hope you have some sort of quotes around that.
>
> >
> > Didn't work and I couldn't find anything out on the search engines.
>
> You simply cant have or : in the username, it violates the URL
> specifications. A quick reading of your fopen would tell me to:
>
> open a connection to 'mydomain.com' on port
> 'mypassowrdsubdomain.maindomain.com', and send the username
> 'myname'.
>
>
> Curt
> --
> First, let me assure you that this is not one of those shady pyramid
schemes
> you've been hearing about. No, sir. Our model is the trapezoid!

attached mail follows:


Is your login page a real HTML page? In that case you could use PEAR's
HTTP_Client package to do the login and move on.

http://pear.php.net/package/HTTP_Client

On Fri, 9 Jul 2004 10:17:25 -0600, Gunter Sammet
<guntersammysolutions.com> wrote:
> I tried that before manually with %40 and it didn't work. It's now valid but
> Apache seems to not recognize the login credentials and sends me to the
> login page. And that's the one I need to skip.
>
> Thanks!
>
> G.
>
> "Justin Patrin" <papercranegmail.com> wrote in message
> news:432beae0407090825382deaf1mail.gmail.com...
> > Try using urlencode on the e-mail address.
> >
> > On Thu, 8 Jul 2004 23:30:33 -0600, Gunter Sammet
> > <guntersammysolutions.com> wrote:
> > > Hi all:
> > > Tried to use fopen like this:
> > >
> > > fopen(mynamemydomain.com:mypasswordsubdomain.maindomain.com);
> > >
> > > Didn't work and I couldn't find anything out on the search engines.
> > >
> > > Any suggestions how to get this working?
> > >
> > > TIA
> > >
> > > Gunter
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > >
> > >
> >
> >
> > --
> > DB_DataObject_FormBuilder - The database at your fingertips
> > http://pear.php.net/package/DB_DataObject_FormBuilder
> >
> > paperCrane --Justin Patrin--
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> !DSPAM:40eec33d305441786320709!
>
>

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


Gunter Sammet wrote:

>Yes I had quotes. And you're right the interpretation of the URL is as you
>laid it out.
>
>Unfortunatelly I don't have control on the login credentials. Tried %40 to
>replace the but then it won't be accepted as a login.
>
>Thanks for your reply!
>
>
You need to use CHAP authentication, chap authentication in it's
simplest form requires that the username password combination has to be
sent as a base 64 encoded header. More details are available in RFC 2616
but rather than reinventing the wheel you might want to use an available
HTTP class or curl.

To elaborate futher you have to open a socket as curt suggested and when
you get the 40x (can't remember the number) header saying authentication
required, you need to respond by sending the header described above.

>>open a connection to 'mydomain.com' on port
>>'mypassowrdsubdomain.maindomain.com', and send the username
>>'myname'.
>>
>>
>>
>>

--
Raditha Dissanayake.
---------------------------------------------
http://www.raditha.com/megaupload/upload.php
Sneak past the PHP file upload limits.

attached mail follows:


On Thu, 8 Jul 2004 16:05:53 +0100, Phil Mellor <philmelloryahoo.co.uk> wrote:
> Hello world!
>
> Please help! I have a CMS built which I have a problem with and I don't know
> if it's a coding error or a bug, but any suggestions would be welcome!
>
> My CMS pulls information from MySQL database with slashes. On one particular
> content module I have a problem! I'm trying to 'require' a module stored on
> disk, sometimes it works and othertimes it produces the following error:
>
> Parse error: parse error, expecting `','' or `';'' in
> /home/sites/site8/web/cmp/generatePage.php(565) : eval()'d code on line 45
>
> If I echo the statement which is supposed to be eval'ed and compare it to
> when it works, the only difference is that the working one includes slashes
> (this makes sense as I'm stripping slashes from the DB result to make it
> work!).
>
> Anyone got any idea how I work around this issue? I can't add or
> stripslashes from the file on disk, because then it fails because of the
> same intermittant error!
>

If it's failing on code from the DB, it has nothing to do with slashes
in the included file.

1) You really shouldn't be storing code in the DB, it's much better to
use files.
2) eval-ing code should be a last-ditch effort. Using eval() can lead
to huge security vulnerabilities.

If you still want to use it, look at how you're entering the code into
the DB. Likely it has extra slashes. This in turn is probably the
fault of magic_quotes_gpc. If you have slashes before quotes in the
DB, your problem is that you're adding too many slashes. Either you're
calling addslashes twice or magic_quotes is adding slashes, and then
you're adding slashes again. Check to see if magic_quotes_gpc is on
(phpinfo() or your php.ini). Please see the archives of this list for
more discussion.

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


Hi,

Considering the following script :

====================================================
<?

$dico = array(
     "abaisser" => "def.php?id=9",
     "singer" => "def.php?id=9"
);

$texte = "Abaisser Vous abaisserez la pate, abaisser.Singer";

while(list($mot,$def) = each($dico)) {
$pattern = "(".$mot.")[^[:alpha:]]";
echo "$pattern<BR>";
     $texte = eregi_replace($pattern, "<a href=\"$def\">\\0</a>", $texte);
}

echo $texte;

?>
=========================================================

What I'm trying to do:

I'm trying to have the proper variables for the eregi_replace so that each
word in the $dico array is replaced by a link to its definition respecting
the following rules :
-only exact match makes a link to the definition, for example :
     - "abaisseraient" doesn't make a link
     - "reabaisser" doesn't make a link
     - " abaisser," or "smthg.Abaisser " makes a link on "abaisser" only,
so that the whitespace, comma or dot isn't part of the link
     - "abaisser" a the end of the string make a link

-I don't want to make a link when already in a link :
     - "<a href='some_page.php'>tu peux abaisser le levier</a>" doesn't not
make a link on "abaisser"

I know I'm bad with regex and really need some help on this. This would be
really appreciated.

Regards,

Michael

attached mail follows:


hi...

i'm in need of some basic test code that will allow me to iterate through
some tables in a database that i'm creating...

basically, i have a number of tables, where each table has a name/id. each
table also has a parent, and a child table, where the connection is the id
of the table.

i'm looking for a quick/basic app that i can modify to allow me to select an
item from the table, get to the underlying data, and continue down the
path... i'd like some sort of "breadcrumb" path to be displyed, that would
allow me to select the previous parent/table as well...

i've seen a few example apps for the breadcrumbs, but nothing that's
specific/useful for my immediate needs... i figure that whatever i find, i'm
going to have to modify somewhat, but i'd like to get as close to possible..

thanks for any assistance/help

-bruce

attached mail follows:


On Fri, 9 Jul 2004 10:09:55 -0700, bruce <bedouglasearthlink.net> wrote:
> hi...
>
> i'm in need of some basic test code that will allow me to iterate through
> some tables in a database that i'm creating...
>
> basically, i have a number of tables, where each table has a name/id. each
> table also has a parent, and a child table, where the connection is the id
> of the table.
>
> i'm looking for a quick/basic app that i can modify to allow me to select an
> item from the table, get to the underlying data, and continue down the
> path... i'd like some sort of "breadcrumb" path to be displyed, that would
> allow me to select the previous parent/table as well...
>
> i've seen a few example apps for the breadcrumbs, but nothing that's
> specific/useful for my immediate needs... i figure that whatever i find, i'm
> going to have to modify somewhat, but i'd like to get as close to possible..
>
> thanks for any assistance/help
>

If you're looking for a DB editing app, you could try
DB_DataObject_FormBuilder_Frontend:
http://www.reversefold.com/PEAR/DB_DataObject_FormBuilder_Frontend/src/

It doesn't support the breadcrumb thing, though. If you want that kind
of thing, my old version of that app (not based on DB_DataObject) has
something like that, but it's old...
http://sourceforge.net/projects/rdbedit/

You would want version 0.2.1.

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


for clarification....

i'm not looking to edit the database...

i'm looking for an app that i can use to test that the tables/relationships
are properly implemented.. the best/fastest way to do this is to implement a
fast/dirty app that will display the top level table as a list of items...

i want to be able to select an item, have the child list be provided, selct
a child item, etc... basically, i want to recursively be able to
iterate/walk through the items of the tables...

i would also like a breadcrumb function that more or less allows me to know
where i am within the list, and would allow me to select a link in the
breadcrumb trail and get to a given parent item...

thanks

-bruce

-----Original Message-----
From: Justin Patrin [mailto:papercranegmail.com]
Sent: Friday, July 09, 2004 10:11 AM
To: bedouglasearthlink.net
Cc: php-generallists.php.net
Subject: Re: [PHP] basic web based test code needed to test database
tables!!!!!

On Fri, 9 Jul 2004 10:09:55 -0700, bruce <bedouglasearthlink.net> wrote:
> hi...
>
> i'm in need of some basic test code that will allow me to iterate through
> some tables in a database that i'm creating...
>
> basically, i have a number of tables, where each table has a name/id. each
> table also has a parent, and a child table, where the connection is the id
> of the table.
>
> i'm looking for a quick/basic app that i can modify to allow me to select
an
> item from the table, get to the underlying data, and continue down the
> path... i'd like some sort of "breadcrumb" path to be displyed, that would
> allow me to select the previous parent/table as well...
>
> i've seen a few example apps for the breadcrumbs, but nothing that's
> specific/useful for my immediate needs... i figure that whatever i find,
i'm
> going to have to modify somewhat, but i'd like to get as close to
possible..
>
> thanks for any assistance/help
>

If you're looking for a DB editing app, you could try
DB_DataObject_FormBuilder_Frontend:
http://www.reversefold.com/PEAR/DB_DataObject_FormBuilder_Frontend/src/

It doesn't support the breadcrumb thing, though. If you want that kind
of thing, my old version of that app (not based on DB_DataObject) has
something like that, but it's old...
http://sourceforge.net/projects/rdbedit/

You would want version 0.2.1.

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


<>
I've gotten this one report of having a problem downloading a PDF:

"I have tried twice, both times its starts to download but stops about
half way or three-quarters the way complete. I get a error message that
the download was not completed. When I go to look at the message there
is just numbers. I have tried to download again but the "numbers" show
up and it won't let me try again."

This only happens for this person with one file - the rest of the files
work fine. I am streaming the file with this code:

// will return FALSE if the file is not found
// will not return anything if the file is found because the headers should
// have already been sent.
function streamfile($file)
{
    if (file_exists($file))
    {

        $extension = strtolower(stristr($file, "."));
       
        if ($extension == ".php" || $extension == ".html" || $extension
== ".htm" || $extension == ".shtml") {
            include ($file);
        }
        else if ($extension == ".txt")
        {
            ?>
            <html>
            <body>
            <pre>
            <? include($file);?>
            </pre>
            </body>
            </html>
            <?
        }
        else {

            // a switch would be perfect here,
            // but it just didn't work last time...it was always
            // taking the 'default:' case
            if ($extension == ".doc"){$type = "application/msword";}
            else if ($extension == ".pdf"){$type = "application/pdf";}
            else if ($extension == ".exe"){$type =
"application/octet-stream";}
            else if ($extension == ".ppt"){$type =
"application/vnd.ms-powerpoint";}
            else if ($extension == ".xls"){$type =
"application/vnd.ms-excel";}
            else if ($extension == ".xml"){$type = "text/xml";}
            else if ($extension == ".zip"){$type = "application/zip";}
            else if ($extension == ".txt"){$type = "text/plain";}
            else {
                $type="application/octet-stream";
            }

            header("Content-Type: " . $type);
            header("Accept-Ranges: bytes");
            header("Content-Length: ".filesize($file));
            header("Content-Disposition: attachment;
filename=".basename($file).";");
            //readfile($file);
           
           
           
            $fp = fopen($file, 'rb');
            $buffer = fpassthru($fp);
            fclose($fp);
            exit();
           
        }
        return TRUE;

    }
    else
    {
        return FALSE;
    }
}

Anyone have any ideas? It would be appreciated.

Scott

attached mail follows:


I've had a similar problem. The issue was that Norton Personal
Firewall was corrupting the download...I have no idea why. To make it
work, I had to use mod_rewrite to make the URL look like a normal file
URL, then I found out that it would only work over HTTPS.....again, no
idea why. If the user has Norton Peronsal Firewall, ask them to
disable it and try again.

On Fri, 09 Jul 2004 13:11:36 -0400, Scott Taylor
<scotttaylorbigfoot.com> wrote:
> <>
> I've gotten this one report of having a problem downloading a PDF:
>
> "I have tried twice, both times its starts to download but stops about
> half way or three-quarters the way complete. I get a error message that
> the download was not completed. When I go to look at the message there
> is just numbers. I have tried to download again but the "numbers" show
> up and it won't let me try again."
>
> This only happens for this person with one file - the rest of the files
> work fine. I am streaming the file with this code:
>
> // will return FALSE if the file is not found
> // will not return anything if the file is found because the headers should
> // have already been sent.
> function streamfile($file)
> {
> if (file_exists($file))
> {
>
> $extension = strtolower(stristr($file, "."));
>
> if ($extension == ".php" || $extension == ".html" || $extension
> == ".htm" || $extension == ".shtml") {
> include ($file);
> }
> else if ($extension == ".txt")
> {
> ?>
> <html>
> <body>
> <pre>
> <? include($file);?>
> </pre>
> </body>
> </html>
> <?
> }
> else {
>
> // a switch would be perfect here,
> // but it just didn't work last time...it was always
> // taking the 'default:' case
> if ($extension == ".doc"){$type = "application/msword";}
> else if ($extension == ".pdf"){$type = "application/pdf";}
> else if ($extension == ".exe"){$type =
> "application/octet-stream";}
> else if ($extension == ".ppt"){$type =
> "application/vnd.ms-powerpoint";}
> else if ($extension == ".xls"){$type =
> "application/vnd.ms-excel";}
> else if ($extension == ".xml"){$type = "text/xml";}
> else if ($extension == ".zip"){$type = "application/zip";}
> else if ($extension == ".txt"){$type = "text/plain";}
> else {
> $type="application/octet-stream";
> }
>
> header("Content-Type: " . $type);
> header("Accept-Ranges: bytes");
> header("Content-Length: ".filesize($file));
> header("Content-Disposition: attachment;
> filename=".basename($file).";");
> //readfile($file);
>
> $fp = fopen($file, 'rb');
> $buffer = fpassthru($fp);
> fclose($fp);
> exit();
>
> }
> return TRUE;
>
> }
> else
> {
> return FALSE;
> }
> }
>
> Anyone have any ideas? It would be appreciated.
>
> Scott
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> !DSPAM:40eed02516717083715592!
>
>

--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

attached mail follows:


In article <40EED1C8.5040601bigfoot.com>, Scott Taylor wrote:
> "I have tried twice, both times its starts to download but stops about
> half way or three-quarters the way complete. I get a error message that
> the download was not completed. When I go to look at the message there
> is just numbers. I have tried to download again but the "numbers" show
> up and it won't let me try again."

Perhaps the execution time has been exceeded?

> if (file_exists($file))
> {
> // a switch would be perfect here,
> // but it just didn't work last time...it was always
> // taking the 'default:' case

Probably because you forgot to put a break.
Also this is discussed in the manual.

And a lazy programmer would lookup the extension - content-type
relationship in a file like /etc/mime.types :)

--
Tim Van Wassenhove <http://home.mysth.be/~timvw>

attached mail follows:


On Thursday 08 July 2004 10:12 pm, Michal Migurski wrote:
> Much easier recommendation: use provided sprintf, but parse out any
> unwanted placeholders first, using preg_replace.
>

After some thought, I think I'll follow this recommendation.
With the frequency that I would have to execute this code, I would rather it
be as fast as possible.
Wish me luck...

attached mail follows:


I'm using this, but it is wrong.

$mydata->JR = eregi_replace($searchenquiry, "<b>".$searchenquiry."</b>", $mydata->JR);
echo $searchenquiry;

What I should display is if $searchenquiry = $mydata->JR in a case insensitive way then
echo "<b>".$searchenquiry."</b>";

Do I use if (x =~ b) {} or some sort of string compare or ... ?
John

attached mail follows:


> $mydata->JR = eregi_replace($searchenquiry, "<b>".$searchenquiry."</b>", $mydata->JR);
> echo $searchenquiry;
>
> What I should display is if $searchenquiry = $mydata->JR in a case insensitive way then
> echo "<b>".$searchenquiry."</b>";
>
> Do I use if (x =~ b) {} or some sort of string compare or ... ?
> John

if you want to compare the 2 strings why not do something like this:

if (strtoupper($searchenquiry) == strtoupper($mydata->JR) )

attached mail follows:


>if (strtoupper($searchenquiry) == strtoupper($mydata->JR) )

The problem is $searchenquiry would be contained inside $mydata->JR so I would need to see if it exists and then put <b>...</b> around it, without changing the original case.

Thanks,
J

"Matt M." wrote:

> > $mydata->JR = eregi_replace($searchenquiry, "<b>".$searchenquiry."</b>", $mydata->JR);
> > echo $searchenquiry;
> >
> > What I should display is if $searchenquiry = $mydata->JR in a case insensitive way then
> > echo "<b>".$searchenquiry."</b>";
> >
> > Do I use if (x =~ b) {} or some sort of string compare or ... ?
> > John
>
> if you want to compare the 2 strings why not do something like this:
>
> if (strtoupper($searchenquiry) == strtoupper($mydata->JR) )

attached mail follows:


> The problem is $searchenquiry would be contained inside $mydata->JR so I would need to see if it exists and then put <b>...</b> around it, without changing the original case.

what do you have in $searchenquiry?

try this

echo preg_replace ('/('.$searchenquiry.')/i' , "<b>$1</b>", $mydata->JR);

attached mail follows:


$searchenquiry = "Never cry Wolfe"
and
$mydata->ST contains "... Never Cry Wolfe ..."

This code echos:
<td>".preg_replace ('/('.$searchenquiry.')/i' , "<b>$1</b>", $mydata->ST)."&nbsp;</td>

<td>... <b>Never cry Wolfe</b> ...</td>

But I want it to use the original text and echo:

<td>... <b>Never Cry Wolfe</b> ...</td>

Do-able?

> try this
> echo preg_replace ('/('.$searchenquiry.')/i' , "<b>$1</b>", $mydata->JR);

John

attached mail follows:


Hi all.

in a desperate effort to whittle down my code I decided to use an include
statement in my webpage:

http://www.arrasresources.co.uk

But the include statement:

<?php include "Header.inc"; ?>

Brings in the correct file but not an images referenced in the CSS file,
just the background and formatting.

Has anyone come across this before...?

--
-----------------------------
 Michael Mason
 Arras People
 www.arraspeople.co.uk
-----------------------------

attached mail follows:


Harlequin wrote:

> <?php include "Header.inc"; ?>
>
> Brings in the correct file but not an images referenced in the CSS file,
> just the background and formatting.
>
> Has anyone come across this before...?
>
>
>

Huh? The include-statement just includes code/html, it doesn't correct
any links or such.
probably the link in your css-file is wrong from the place where you
include.

thomas

attached mail follows:


I have my two html textarea fields followed by these two buttons. <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <br> <input type="submit" name="calcentry" value="Calc Your Entry" /> <input type="submit" name="clearentry" value="Clear Your Entry" /> </form>
I have textarea1 to type words into. I have textarea2 for my results. I have people type words in textarea1 and after hitting the "calcentry" button I want to reload the same page, go into my: if ($calcentry) {...} part of my code and do some calculations with php and mysql and put my output into textarea2. But after submitting and re-loading the page my textarea1 field is empty. So my first question is how do I keep the data in textarea1 so when I perform my submit I can do some calculations on it etc? Then how can I place my results into textarea2. So all I want is to type words into a textarea field, reload the same page, do some calcs on these words, and place the results into textarea. So it amounts to having the exact same page but now I have my calculated results in the second textarea. I have all my code for calcs etc. and it works fine. Thanks for any help, Doug

attached mail follows:


You have the data in the $_POST global.
So submit it to _self as you already have and
if $_POST['calcentry'] is present and not null then do
your calculation
then set the value of the sencond textarea to the
result.

--- "Hull, Douglas D" <ddhullku.edu> wrote:
> I have my two html textarea fields followed by these
> two buttons.

<form
> action="<?=$_SERVER['PHP_SELF']?>" method="post">
> <br>
        <input type="submit" name="calcentry"
> value="Calc Your Entry" /> <input type="submit"
> name="clearentry" value="Clear Your Entry" />
> </form>
> I have textarea1 to type words into. I have
> textarea2 for my results. I have people type words
> in textarea1 and after hitting the "calcentry"
> button I want to reload the same page, go into
> my:

if ($calcentry) {...}

part of my code and do
> some calculations with php and mysql and put my
> output into textarea2. But after submitting and
> re-loading the page my textarea1 field is empty. So
> my first question is how do I keep the data in
> textarea1 so when I perform my submit I can do some
> calculations on it etc? Then how can I place my
> results into textarea2.

So all I want is to type
> words into a textarea field, reload the same page,
> do some calcs on these words, and place the results
> into textarea. So it amounts to having the exact
> same page but now I have my calculated results in
> the second textarea. I have all my code for calcs
> etc. and it works fine.

Thanks for any help,
Doug
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

attached mail follows:


>:if ($calcentry) {...}part of my code and do some calculations with
php and mysql >and put my output into textarea2.

if ($_POST['calcentry'] == 'Calc Your Entry') {
}

is one way to do it

>So my first question is how do I keep the data in textarea1 so when I
perform my >submit I can do some calculations on it etc? Then how can
I place my results >into textarea2.

<textarea name="textarea1"><?php echo
htmlentities($_POST['textarea1']);?></textarea>

<textarea name="textarea2"><?php echo $yourcalculatedvariable;?></textarea>

attached mail follows:


hi, all:
We have a bioinformatic website that focus on experiment submission and
data analysis. The old site was written in PHP. Now, we try to
re-organize the website to make it easier to browser. One of the
chanllenges is tracking the logged-in user's activity so that we can
show which experiment, dataset, tool the user is using. Someone
suggested PHPNUKE. I am not sure whether it can meet our tracking of
user. In addition, we got tons of forms and pages. It might difficult
to convert them. Would you please give us some good suggestion for some
packages? It does not matter whether it is open source or not. Thanks.

yours,
xin

attached mail follows:


Track activity using a web log analyzer rather than trying to integrate
something with the site. Try webtrends.com for an example.

> hi, all:
> We have a bioinformatic website that focus on experiment submission and
> data analysis. The old site was written in PHP. Now, we try to
> re-organize the website to make it easier to browser. One of the
> chanllenges is tracking the logged-in user's activity so that we can
> show which experiment, dataset, tool the user is using. Someone
> suggested PHPNUKE. I am not sure whether it can meet our tracking of
> user. In addition, we got tons of forms and pages. It might difficult
> to convert them. Would you please give us some good suggestion for some
> packages? It does not matter whether it is open source or not. Thanks.
>
> yours,
> xin

attached mail follows:


Just to make it simple this is my whole page for now, when putting words in the textarea "zwords" and hitting "calc your entry" it never goes into my if statement:

<html> <body> <? if ($_POST['$calcentry'] == "Calc Your Entry") { echo 'xxx' . $zwords . 'xxx'; }
?>
<textarea name="zwords" rows="20" cols="30" wrap /> </textarea> <textarea name="zoutput" rows="20" cols="70" wrap /> </textarea> <BR> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <br> <input type="submit" name="calcentry" value="Calc Your Entry" /> </form> </body> </html>
Thanks,
Doug

attached mail follows:


if ($_POST['calcentry'] == "Calc Your Entry") {

Hull, Douglas D wrote:
> Just to make it simple this is my whole page for now, when putting words in the textarea "zwords" and hitting "calc your entry" it never goes into my if statement:
>
> <html>
> <body>
> <?
> if ($_POST['$calcentry'] == "Calc Your Entry") {
> echo 'xxx' . $zwords . 'xxx';
> }
> ?>
> <textarea name="zwords" rows="20" cols="30" wrap />
> </textarea>
> <textarea name="zoutput" rows="20" cols="70" wrap />
> </textarea> <BR>
> <form action="<?=$_SERVER['PHP_SELF']?>" method="post"> <br>
> <input type="submit" name="calcentry" value="Calc Your Entry" />
> </form>
> </body>
> </html>
> Thanks,
> Doug
>

attached mail follows:


Sorry about that. It did execute my if but shows nothing for $zwords.
So my echo shows: xxxxxx
after entering "cat" and pressing my calc your entry.
How do I get my value(s) I entered in to work with?

Thanks
> ----------
> From: Marek Kilimajer
> Sent: Friday, July 9, 2004 1:41 PM
> To: Hull, Douglas D
> Cc: Note To Php general List (E-mail)
> Subject: Re: [PHP] after suubmitting, working with data on same page
>
> if ($_POST['calcentry'] == "Calc Your Entry") {
>
> Hull, Douglas D wrote:
> > Just to make it simple this is my whole page for now, when putting words in the textarea "zwords" and hitting "calc your entry" it never goes into my if statement:
> >
> > <html>
> > <body>
> > <?
> > if ($_POST['$calcentry'] == "Calc Your Entry") {
> > echo 'xxx' . $zwords . 'xxx';