|
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-help_at_lists.php.net
Date: Thu Jan 09 2003 - 05:25:16 CST
php-general Digest 9 Jan 2003 11:25:16 -0000 Issue 1812
Topics (messages 130821 through 130922):
Re: strange problem (user poll)
130821 by: Kevin Stone
130833 by: - \[ Paul Ferrie \] -
Re: How Do I Return Values Across Servers
130822 by: Bill Arbuckle, Jr.
130824 by: Timothy Hitchens \(HiTCHO\)
Re: HTML email that generates "!"s - any ideas?
130823 by: Tom Rogers
130826 by: Timothy Hitchens \(HiTCHO\)
Will pay for PHP
130825 by: Andy Cook
Re: apache + mod_php question
130827 by: Rick Widmer
$query help :(
130828 by: - \[ Paul Ferrie \] -
130831 by: Timothy Hitchens \(HiTCHO\)
130864 by: Jason Wong
Re: Adding HTTP URL Code
130829 by: Justin French
Re: Submit Form
130830 by: Justin French
130909 by: DreamRiver
Dynamic Regex
130832 by: Gerard Samuel
130837 by: Greg Beaver
130869 by: Gerard Samuel
130870 by: Greg Beaver
130874 by: Gerard Samuel
Variables
130834 by: Stephen
130835 by: Timothy Hitchens \(HiTCHO\)
130836 by: Justin French
Stumped...
130838 by: Stephen
130839 by: Timothy Hitchens \(HiTCHO\)
130840 by: Stephen
130842 by: Timothy Hitchens \(HiTCHO\)
130846 by: Stephen
130848 by: Timothy Hitchens \(HiTCHO\)
130862 by: Stephen
130863 by: Sean Malloy
130865 by: Sean Malloy
apache and php
130841 by: Gareth Thomas
130844 by: Timothy Hitchens \(HiTCHO\)
How to strip extra characters off of a string
130843 by: rdkurth.starband.net
130847 by: Timothy Hitchens \(HiTCHO\)
130853 by: Jean-Christian Imbeault
Re: Strange file upload problem in php 4.2.3
130845 by: theheadsage.manga-sketchbook.org
Re: How to detect a PHP script time-out?
130849 by: Jean-Christian Imbeault
130851 by: Jean-Christian Imbeault
130904 by: Tamas Arpad
130906 by: Jean-Christian Imbeault
Re: how to generate one in a string
130850 by: Jean-Christian Imbeault
OpenSSL integration
130852 by: Jonathan Lassoff
problem with location???
130854 by: Ysrael Guzmán
130855 by: Timothy Hitchens \(HiTCHO\)
130860 by: Jean-Christian Imbeault
Different php.ini for each user on same server
130856 by: SED
130857 by: Timothy Hitchens \(HiTCHO\)
130858 by: Timothy Hitchens \(HiTCHO\)
130859 by: SED
130861 by: Timothy Hitchens \(HiTCHO\)
float precision
130866 by: Kevin Avila
130867 by: Jason Wong
Databases vs. File Access
130868 by: Erich Kolb
130872 by: Jean-Christian Imbeault
130878 by: Timothy Hitchens \(HiTCHO\)
session_destroy problem
130871 by: Ken Nagorski
130875 by: Gerard Samuel
Segmentation fault and var_dump()
130873 by: Rob Brandt
130886 by: Jason Wong
Advice
130876 by: cj
aggregation users?
130877 by: Greg Beaver
XML File does not reflect changes upon reopen - HELP
130879 by: Phil Powell
Connection pool extension?
130880 by: Vinod Panicker
130881 by: Timothy Hitchens \(HiTCHO\)
130882 by: Vinod Panicker
directory listing
130883 by: Ale¹ Lonèar
130887 by: Jason Wong
proc_open() problems
130884 by: Jean-Christian Imbeault
string prints out as number (E+10...), why?
130885 by: Jean-Christian Imbeault
130891 by: - Edwin
130892 by: Jean-Christian Imbeault
130895 by: - Edwin
130897 by: Jean-Christian Imbeault
output of calling grep lr
130888 by: Martin Hudec
130889 by: Jean-Christian Imbeault
Re: fast template over xsl
130890 by: rush
gettext and translations
130893 by: electroteque
130902 by: - Edwin
130905 by: electroteque
130911 by: electroteque
how to make server response to emails
130894 by: See kok Boon
130899 by: - Edwin
130900 by: Jean-Christian Imbeault
130903 by: Jason Wong
130912 by: See kok Boon
130913 by: See kok Boon
130916 by: Jason Wong
130918 by: Jean-Christian Imbeault
Re: [PHP-DEV] Terminal text objects (PHP CDK NCURSES)
130896 by: Wez Furlong
Configuring 4.3.0 on Solaris 2.8
130898 by: Ewan McDowall
130919 by: Ewan McDowall
Re: How can I redirect to another php page
130901 by: DreamRiver
PHP 4.3.0, __CLASS__ and __FUNCTION__
130907 by: Michael Virnstein
130908 by: nicos.php.net
money
130910 by: Wilbert Enserink
130914 by: rblack.datavisibility.co.uk
130915 by: Danny Shepherd
130917 by: Jean-Christian Imbeault
130921 by: Scott Houseman
Re: money - done
130920 by: W. Enserink
session not set, server configuration?
130922 by: James Tan
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I have no idea what I did but this email was not supposed to go to the
list.. my apologies. *LOL*
-Kevin
----- Original Message -----
From: "Kevin Stone" <kevin
helpelf.com>
To: <php-general
lists.php.net>
Sent: Wednesday, January 08, 2003 4:18 PM
Subject: Fw: [PHP] strange problem (user poll)
> vanway
vanwaytrophy.com
>
>
>
> It would help to know where $action is being defined.
> ----- Original Message -----
> From: "- [ Paul Ferrie ] -" <info
innovativedesigns.org.uk>
> To: <php-general
lists.php.net>
> Sent: Wednesday, January 08, 2003 3:43 PM
> Subject: [PHP] strange problem (user poll)
>
>
> > Can anyone see a problem in this? When i run the script i am getting
this
> > error "Notice: Undefined variable: action in
> > C:\www\Apache2\htdocs\user_poll\2\addpoll.php on line 13"
> >
> > <?
> > // addpoll.php
> > // Case Study 1: User Poll - Foundation PHP for Flash
> >
> > // If the form has been submitted...
> > (line 13) if ($action == "add") {
> > // Include config file
> > include('common.php');
> >
> > // Connect to database
> > $link = dbConnect();
> >
> > // Get date for new poll
> > $posted = time();
> >
> > // Build query to insert new poll
> > $query = "INSERT INTO polls (question, option1, option2, option3,
> > posted)
> > VALUES('$question', '$option1', '$option2', '$option3',
> > $posted)";
> >
> > // Execute query
> > $result =
mysql_query($query);
> >
> > // If query failed...
> > if (!$result) {
> > // Display error
> > print "<font color=\"#ff0000\">Could not insert
> poll</font><br>\n";
> > } else {
> > print "<font color=\"#0000ff\">Poll added</font><br>\n";
> > }
> >
> > mysql_close($link);
> > }
> > ?>
> > please anyone
> >
> >
> >
> > --
> > 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
>
>
attached mail follows:
It seem there is some probs with the latest release of php something about
global vars.
Jst checked and it works now. It was the php thing right enough. i hope
that my server admin have done the same thing with the php.ini
cheers guys.
"- -" <info
innovativedesigns.org.uk> wrote in message
news:20030108224305.26860.qmail
pb1.pair.com...
> Can anyone see a problem in this? When i run the script i am getting this
> error "Notice: Undefined variable: action in
> C:\www\Apache2\htdocs\user_poll\2\addpoll.php on line 13"
>
> <?
> // addpoll.php
> // Case Study 1: User Poll - Foundation PHP for Flash
>
> // If the form has been submitted...
> (line 13) if ($action == "add") {
> // Include config file
> include('common.php');
>
> // Connect to database
> $link = dbConnect();
>
> // Get date for new poll
> $posted = time();
>
> // Build query to insert new poll
> $query = "INSERT INTO polls (question, option1, option2, option3,
> posted)
> VALUES('$question', '$option1', '$option2', '$option3',
> $posted)";
>
> // Execute query
> $result =
mysql_query($query);
>
> // If query failed...
> if (!$result) {
> // Display error
> print "<font color=\"#ff0000\">Could not insert
poll</font><br>\n";
> } else {
> print "<font color=\"#0000ff\">Poll added</font><br>\n";
> }
>
> mysql_close($link);
> }
> ?>
> please anyone
>
>
attached mail follows:
Yes, I want to get a value from a script on Server A that runs against a
database on Server A, returning that value to a script variable on Server B.
I read the manual but must have missed something. This is what *seemed* as
if it should work:
Server A (containing functions and database)
qotd.php
<?php
requireonce('miscfuncs.php');
$qotd= qotd();
?>
** qotd()is a f(x) in miscfuncs.php
=============================
Server B
test.php
... HTML stuff
<?php
include 'http://www.servera.com/qotd.php';
echo $qotd . "\n<br>\n";
?>
... More HTML stuff
With this setup I get the following error: Warning: Failed opening
'http://www.servera.com/qotd.php' for inclusion
(include_path='.;c:\php4\pear') in c:\webdev\kids\homebody.inc on line 27
Any ideas? I know that I am missing something here.
Thanks,
Bill
-----Original Message-----
From: Timothy Hitchens (HiTCHO) [mailto:phplists
hitcho.com.au]
Sent: Wednesday, January 08, 2003 4:45 PM
To: 'Bill Arbuckle, Jr.'; php-general
lists.php.net
Subject: RE: [PHP] How Do I Return Values Across Servers
If I understand you want to be able to get a value from a script on
another server.
Well I would suggest a really each way would be to do have the calling
server call
a script on the supplying server using include(); which is supported but
please see
this page regarding URL fopen wrappers:
http://www.php.net/manual/en/function.include.php
Requests for includes and on the supplying server simply output the
value like:
<?php
$answer = 'no';
?>
If you do it this way it will be simply included and be available as a
variable instantly.
(**subject to security issues and speed)
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Bill Arbuckle, Jr. [mailto:bill
wingshooter.net]
> Sent: Thursday, 9 January 2003 8:17 AM
> To: php-general
lists.php.net
> Subject: [PHP] How Do I Return Values Across Servers
>
>
> This may be a no-brainer for everyone but me but ... I have
> several php scripts residing on a web site on Server A. In a
> library file on Server A are misc. functions, some of which
> query an underlying database and return a text string as the
> result. On another web site on Server B I would like to call
> these functions to get the result without reinventing the
> wheel so to speak. So my question is ... How can I call a
> function that returns a text string from Server A in a script
> requiring that text during the processing of a web page on
> Server B ... all in php? Thanks in advance.
>
> Bill
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Issue you have is that if it is on another server you must you a http etc transport to get it!!
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Bill Arbuckle, Jr. [mailto:bill
wingshooter.net]
> Sent: Thursday, 9 January 2003 9:38 AM
> To: Timothy Hitchens (HiTCHO); php-general
lists.php.net
> Subject: RE: [PHP] How Do I Return Values Across Servers
>
>
> Yes, I want to get a value from a script on Server A that
> runs against a database on Server A, returning that value to
> a script variable on Server B.
>
> I read the manual but must have missed something. This is
> what *seemed* as if it should work:
>
> Server A (containing functions and database)
> qotd.php
>
> <?php
> requireonce('miscfuncs.php');
> $qotd= qotd();
> ?>
>
> ** qotd()is a f(x) in miscfuncs.php
>
> =============================
> Server B
> test.php
>
> ... HTML stuff
>
> <?php
> include 'http://www.servera.com/qotd.php';
> echo $qotd . "\n<br>\n";
> ?>
>
> ... More HTML stuff
>
> With this setup I get the following error: Warning: Failed
> opening 'http://www.servera.com/qotd.php' for inclusion
> (include_path='.;c:\php4\pear') in
> c:\webdev\kids\homebody.inc on line 27
>
> Any ideas? I know that I am missing something here.
>
> Thanks,
>
> Bill
>
>
>
> -----Original Message-----
> From: Timothy Hitchens (HiTCHO) [mailto:phplists
hitcho.com.au]
> Sent: Wednesday, January 08, 2003 4:45 PM
> To: 'Bill Arbuckle, Jr.'; php-general
lists.php.net
> Subject: RE: [PHP] How Do I Return Values Across Servers
>
>
> If I understand you want to be able to get a value from a
> script on another server.
>
> Well I would suggest a really each way would be to do have
> the calling server call a script on the supplying server
> using include(); which is supported but please see this page
> regarding URL fopen wrappers:
>
http://www.php.net/manual/en/function.include.php
Requests for includes and on the supplying server simply output the value like:
<?php
$answer = 'no';
?>
If you do it this way it will be simply included and be available as a variable instantly.
(**subject to security issues and speed)
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Bill Arbuckle, Jr. [mailto:bill
wingshooter.net]
> Sent: Thursday, 9 January 2003 8:17 AM
> To: php-general
lists.php.net
> Subject: [PHP] How Do I Return Values Across Servers
>
>
> This may be a no-brainer for everyone but me but ... I have several
> php scripts residing on a web site on Server A. In a library file on
> Server A are misc. functions, some of which query an underlying
> database and return a text string as the result. On another web site
> on Server B I would like to call these functions to get the result
> without reinventing the wheel so to speak. So my question is ... How
> can I call a function that returns a text string from Server A in a
> script requiring that text during the processing of a web page on
> Server B ... all in php? Thanks in advance.
>
> Bill
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi,
Thursday, January 9, 2003, 7:31:35 AM, you wrote: PH> Hi everyone, I am new to this list, so this is my first post.
PH> I am trying to sen dan HTML email, and so far I got everything running, PH> except for one very odd problem.
PH> 1.) I am setting up all my variables within the .php Script. PH> 2.) I generate my HTML email PH> 3.) I am outputting the email to the browser and send it to myself
-->> Now here comes the problem:
PH> In the browseroutput the text looks like I want it to be. In the email PH> however, PH> there are several EXCLAMATION MARKS ("!") added to the code (and therefore PH> the body). PH> How can this happen?? Is there some trick I have missed? The exclamation PH> marks are PH> positioned within the email according to the amaount of characters I submit PH> with the PH> email.
PH> I have set up a simple page where you can view the .php file, the output and PH> the email.
PH> http://www.gsdh.org/pleasehelp/index.html
PH> If anyone of you could spare the time, I would be really gratefull as I have PH> to finish this but am PH> stuck! :(
PH> Thans again, PH> Philipp
What happens if you paste the php output directly into your mailer ?
-- regards, Tom
attached mail follows:
You need to set an encoding and encode the body see:
http://www.php.net/manual/en/function.imap-8bit.php
**You will need to add the headers for this plus encode**
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Tom Rogers [mailto:trogers
kwikin.com]
> Sent: Thursday, 9 January 2003 9:49 AM
> To: Philipp Hartmann
> Cc: php-general
lists.php.net
> Subject: Re: [PHP] HTML email that generates "!"s - any ideas?
>
>
> Hi,
>
> Thursday, January 9, 2003, 7:31:35 AM, you wrote:
> PH> Hi everyone, I am new to this list, so this is my first post.
>
> PH> I am trying to sen dan HTML email, and so far I got everything
> PH> running, except for one very odd problem.
>
> PH> 1.) I am setting up all my variables within the .php Script.
> PH> 2.) I generate my HTML email
> PH> 3.) I am outputting the email to the browser and send it to myself
>
> -->> Now here comes the problem:
>
> PH> In the browseroutput the text looks like I want it to be. In the
> PH> email however, there are several EXCLAMATION MARKS ("!") added to
> PH> the code (and therefore the body).
> PH> How can this happen?? Is there some trick I have missed?
> The exclamation
> PH> marks are
> PH> positioned within the email according to the amaount of
> characters I submit
> PH> with the
> PH> email.
>
> PH> I have set up a simple page where you can view the .php file, the
> PH> output and the email.
>
> PH> http://www.gsdh.org/pleasehelp/index.html
>
> PH> If anyone of you could spare the time, I would be really
> gratefull
> PH> as I have to finish this but am stuck! :(
>
> PH> Thans again,
> PH> Philipp
>
> What happens if you paste the php output directly into your mailer ?
>
> --
> regards,
> Tom
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
I am bringing up a site in March, but I am working on it now. I need some
PHP (not a lot). Please email me at HotMonkeyAC
hotmail.com and let me know
if you are interested in helping. I'll make it worth your while. Thanks.
attached mail follows:
At 05:16 AM 1/9/03 +1000, Timothy Hitchens \(HiTCHO\) wrote: >use: apachectl graceful > >It will reload the config's and allow operation to continue!!
Yes, in many cases this is the best option. The only time I've found it will not work is when you are adding or changing SSL certificates. For all other changes graceful is much better choice because Apache will not lose any connections. Anything that comes in after the graceful gets handled based on the new configuration. Things that are already running will complete using the old configuration. The important thing, your machine never ignores requests.
Rick
attached mail follows:
Hi again guys i have run into another problem :(
i am trying to build a user poll (flash+php+mysql) I have the interface all sorted but i have a problem with my add new poll php file. When i hit the update poll button in flash it seem that everthing has work and it' send back a msg saying all went well :). but when i check with phpmyadmin i see that the $query has been successfully added but the "question","opt1","opt2","opt3" fields are blank no data added. the only fields to be added were the auto_id and date stamp below is a sample code of the php file and after that you will see the code on the button.
[php] if ($action == "add") { // Include config file include('common.php');
// Connect to database $link = dbConnect();
// Get date for new poll $posted = time();
// Build query to insert new poll $query = "INSERT INTO polls (question, option1, option2, option3, posted) VALUES ('$quest1', '$opt1', '$opt2', '$opt3', $posted)";
// Execute query
$result =
mysql_query($query);
// If query failed... if (!$result) { // Display error print "&result=Could not insert poll"; } else { print "&result=poll created"; }
mysql_close($link); } ?> [/php]
on the button in Flash i have [code] on (release) { if (!quest1.length) { result = "fields missing"; } if (!opt1.length) { result = "fields missing"; } if (!opt2.length) { result = "fields misasing"; } if (!opt3.length) { result = "fields missing"; } else { loadVariables("addpoll.php", this, "POST"); gotoAndPlay(2); } }
[/code]
I have tried everything i can think of but i cab't seem to get it working. Can anyone see anything i am missing? Cheers
attached mail follows:
$posted needs to have '' around it!! <-- this could be stopping it!!
(and always check to see if the vars exist first and if you are using 4.1 + with globals off you will need to change you code now or in the future)
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: - [ Paul Ferrie ] - [mailto:info
innovativedesigns.org.uk]
> Sent: Thursday, 9 January 2003 10:07 AM
> To: php-general
lists.php.net
> Subject: [PHP] $query help :(
>
>
> Hi again guys i have run into another problem :(
>
> i am trying to build a user poll (flash+php+mysql)
> I have the interface all sorted but i have a problem with my
> add new poll php file. When i hit the update poll button in
> flash it seem that everthing has work and it' send back a msg
> saying all went well :). but when i check with phpmyadmin i
> see that the $query has been successfully added but the
> "question","opt1","opt2","opt3" fields are blank no data
> added. the only fields to be added were the auto_id and date
> stamp below is a sample code of the php file and after that
> you will see the code on the button.
>
> [php]
> if ($action == "add") {
> // Include config file
> include('common.php');
>
> // Connect to database
> $link = dbConnect();
>
> // Get date for new poll
> $posted = time();
>
> // Build query to insert new poll
> $query = "INSERT INTO polls (question, option1, option2, option3,
> posted) VALUES ('$quest1', '$opt1', '$opt2', '$opt3', $posted)";
>
> // Execute query
> $result =
mysql_query($query);
>
> // If query failed...
> if (!$result) {
> // Display error
> print "&result=Could not insert poll";
> } else {
> print "&result=poll created";
> }
>
> mysql_close($link);
> }
> ?>
> [/php]
>
> on the button in Flash i have
> [code]
> on (release) {
> if (!quest1.length) {
> result = "fields missing";
> }
> if (!opt1.length) {
> result = "fields missing";
> }
> if (!opt2.length) {
> result = "fields misasing";
> }
> if (!opt3.length) {
> result = "fields missing";
> } else {
> loadVariables("addpoll.php", this, "POST");
> gotoAndPlay(2);
> }
> }
>
> [/code]
>
> I have tried everything i can think of but i cab't seem to
> get it working. Can anyone see anything i am missing? Cheers
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
On Thursday 09 January 2003 08:07, - \[ Paul Ferrie \] - wrote: > Hi again guys i have run into another problem :( > > i am trying to build a user poll (flash+php+mysql) > I have the interface all sorted but i have a problem with my add new poll > php file. > When i hit the update poll button in flash it seem that everthing has work > and it' send back a msg saying all went well :). but when i check with > phpmyadmin i see that the $query has been successfully added but the > "question","opt1","opt2","opt3" fields are blank no data added. the only > fields to be added were the auto_id and date stamp > below is a sample code of the php file and after that you will see the code > on the button.
> // Build query to insert new poll
> $query = "INSERT INTO polls (question, option1, option2, option3,
> posted) VALUES ('$quest1', '$opt1', '$opt2', '$opt3', $posted)";
>
> // Execute query
> $result =
mysql_query($query);
Before you have your code working 100% correctly you shouldn't be doing
anything that hinders debugging. If you didn't already know, prepending an
'
' on a function call disables any error reporting for that particular call.
> // If query failed... > if (!$result) { > // Display error > print "&result=Could not insert poll"; > } else { > print "&result=poll created"; > } >
Those are friendly error messages that are useful _after_ your code is working. When developing you should always use mysql_error() to see the real error message.
> I have tried everything i can think of but i cab't seem to get it working. > Can anyone see anything i am missing?
Always add error checking to your code. Always have error reporting ON.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* I am having FUN... I wonder if it's NET FUN or GROSS FUN? */
attached mail follows:
I think the reason you didn't get a reply is because no one could understand what you wanted to happen.... my guess is...
You need a regular expression to turn URLs in a string into links.
So that this:
--- This is a test. It is only a test. What happens when I include a URL in my results text? http://not.a.real.url/programs This is only a test ---becomes:
--- This is a test. It is only a test. What happens when I include a URL in my results text? <a href="http://not.a.real.url/programs">http://not.a.real.url/programs> This is only a test ---
Correct? Let us know, and I'm sure someone can help you out.
FWIW it's been asked MANY times, so a search of the archives might help.
Justin
on 09/01/03 7:07 AM, ELLIOTT,KATHERINE A (HP-FtCollins,ex1) (katherine.elliott
hp.com) wrote:
> OK, so I've gotten NO responses to my query below so I > thought I'd ask for something slightly different and see what > I get. > > If I have a bunch of plain text data, how can I pull out the > strings containing "http". I've tried several different things > but what I end up with is more or less than what I want. > Once I have this, I can add the URL code and replace the > string but I haven't figured out how to do this. > > For example, what would I do if my text looks like this (not > including the astrices): > > ****************************************************** > This is a test. It is only a test. > What happens when I include a URL in my results text? > > http://not.a.real.url/programs > > This is only a test > ****************************************************** > > Anyone? Anyone? > > Thanks, > > Katherine > > -----Original Message----- > From: ELLIOTT,KATHERINE A (HP-FtCollins,ex1) > [mailto:katherine.elliott
hp.com] > Sent: Tuesday, January 07, 2003 2:36 PM > To: php-general
lists.php.net > Subject: [PHP] Adding HTTP URL Code > > > Hello, > > I have a string of data that can be anywhere from one line (a single URL) > to many, many lines. The data is in plain text but, as I alluded, may > contain > one or more URLs (or none). I then take this data and put it on a web page > so I would like to make any URLs in the data live. Has anyone on the list > done > this? If so, can you tell me how? I'm stumped. > > Thanks, > > Katherine
attached mail follows:
is your question in regards to:
a) how to bring data from the 1st form across to the 2nd, so that it can all be updated together OR
b) how to POST data from a form using a html link, probably with javascript
If b, best place to ask is a javascript list/newsgroup, or by looking for something similar, and checking out how they did it.
Cheers,
Justin
on 09/01/03 9:10 AM, Stephen (webmaster
melchior.us) wrote:
> Hello, > > I have a question. First of all, I want to save the data a user has typed in a > form into a MySQL database so they can load it up for later use but, I need to > first submit all the form vars on the current page from a link. This may be > Javascript, but either way, I'm not sure how to do it. Any ideas? Here's a > graph kinda... > > -User enters form and submits the first page > --User taken to second form > ---User fills out the first two fields > ----User clicks a "Save Progress" link and all form fields submitted > (I can do beyond this part but just so you get the idea of what I mean) > -----PHP saves current form vars to a MySQL database > ------User told information saved and he leaves > -------User comes back next day, clicks load > --------User select his current project > ---------User taken to the last form he was on, fields filled in > > Thanks, > Stephen Craton > http://www.melchior.us > > "What's the point in appearance if your true love, doesn't care about it?" -- > http://www.melchior.us
attached mail follows:
Steven (cc list), The sticky part is: -------User comes back next day, clicks load
For that functionality you will need to remember the user, the last project they were using and the form they were 'on'. How?
You can have the user log in to their last saved state (which you will save when they log out), or set cookies on their machine or ... either way you need a unique way to identify the user, their work and their last form.
When you decide how to maintain/save this 'state' information then your work is laid out for you ...
You can also see some commented and working code for db inserts, cookies, logins, prefilling form data fields, javascript form validation etc. - what you refer to - by downloading a FREE application called phpyellow Lite Edition here:
http://www.dreamriver.com/phpcheckout/showcase.php?productnumber=1
After unzipping take a look at loginResult.php which may have some code you will need. You can skip the install and go right to the code, because a working demo of the code is here: http://phpyellow.com/phpyellow/index.php
This won't answer all your questions, but at least it's a start... the key decision you need to make is how you will save your 'state' information.
richard. http://www.dreamriver.com
Stephen wrote:
______________________________________________________
Message-ID: <001101c2b762$b8624080$0200a8c0
melchior>
From: "Stephen" <webmaster
melchior.us>
To: "PHP List" <php-general
lists.php.net>
Date: Wed, 8 Jan 2003 17:10:13 -0500
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_000D_01C2B738.CEFB1C10"
Subject: Submit Form
Hello,
I have a question. First of all, I want to save the data a user has typed in a form into a MySQL database so they can load it up for later use but, I need to first submit all the form vars on the current page from a link. This may be Javascript, but either way, I'm not sure how to do it. Any ideas? Here's a graph kinda...
-User enters form and submits the first page --User taken to second form ---User fills out the first two fields ----User clicks a "Save Progress" link and all form fields submitted (I can do beyond this part but just so you get the idea of what I mean) -----PHP saves current form vars to a MySQL database ------User told information saved and he leaves -------User comes back next day, clicks load --------User select his current project ---------User taken to the last form he was on, fields filled in
Thanks, Stephen Craton http://www.melchior.us
"What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us _________________________
attached mail follows:
The example doesn't have to make sense, but Im looking for the correct syntax for $foo. I was trying -> $foo = '\[this\](.*?)that'; $bar = 'the other';
$str = preg_replace($foo, $bar, $other_string);
But that doesn't work. I came across an example where the syntax of $foo is in -> $foo = '#\[this\](.*?)that#';
The second syntax of $foo works. I was wondering on the meaning of # in the string??
Thanks
-- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/
attached mail follows:
Hi Gerard,
all the preg_* functions require delimiters surrounding regular expressions.
$foo = '\[this\](.*?)that';
should be by default:
$foo = '/\[this\](.*?)that/';
the code you tried uses # as the delimiter instead of /, an option preg_* allows
Take care, Greg
-- phpDocumentor http://www.phpdoc.org"Gerard Samuel" <gsam
trini0.org> wrote in message news:3E1CC193.90605
trini0.org... > The example doesn't have to make sense, but Im looking for the correct > syntax for $foo. I was trying -> > $foo = '\[this\](.*?)that'; > $bar = 'the other'; > > $str = preg_replace($foo, $bar, $other_string); > > But that doesn't work. I came across an example where the syntax of > $foo is in -> > $foo = '#\[this\](.*?)that#'; > > The second syntax of $foo works. I was wondering on the meaning of # in > the string?? > > Thanks > > -- > Gerard Samuel > http://www.trini0.org:81/ > http://dev.trini0.org:81/ > >
attached mail follows:
What you suggested is what I was trying before. My original example was incorrect. Here is an good example for the variable holding the pattern -> $foo = '/\[url\]([a-z]+://.*?)\[/url\]/'; This pattern would not work, but if I change it to $foo = '#\[url\]([a-z]+://.*?)\[/url\]#'; It does work.
Not complaining but just trying to figure out why the first version doesn't work for future references. Thanks
Greg Beaver wrote:
>Hi Gerard,
>
>all the preg_* functions require delimiters surrounding regular expressions.
>
>$foo = '\[this\](.*?)that';
>
>should be by default:
>
>$foo = '/\[this\](.*?)that/';
>
>the code you tried uses # as the delimiter instead of /, an option preg_*
>allows
>
>Take care,
>Greg
>--
>phpDocumentor
>http://www.phpdoc.org
>
>"Gerard Samuel" <gsam
trini0.org> wrote in message
>news:3E1CC193.90605
trini0.org...
>
>
>> The example doesn't have to make sense, but Im looking for the correct
>>syntax for $foo. I was trying ->
>>$foo = '\[this\](.*?)that';
>>$bar = 'the other';
>>
>>$str = preg_replace($foo, $bar, $other_string);
>>
>>But that doesn't work. I came across an example where the syntax of
>>$foo is in ->
>>$foo = '#\[this\](.*?)that#';
>>
>>The second syntax of $foo works. I was wondering on the meaning of # in
>>the string??
>>
>>Thanks
>>
>>--
>>Gerard Samuel
>>http://www.trini0.org:81/
>>http://dev.trini0.org:81/
>>
>>
>>
>>
>
>
>
>
>
-- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/
attached mail follows:
hi Gerard,
I didn't think you were complaining :)
the problem is in [/url]
$foo = '/\[url\]([a-z]+://.*?)\[/url\]/';
should be
$foo = '/\[url\]([a-z]+://.*?)\[\/url\]/';
that "/" was ending the pattern, and so preg_* was trying to read "url\]/" as closing information, and probably giving an odd error about "u" not being appropriate
that's why # worked, because there were no other # in the string.
Hope that answers the question (properly this time!)
Take care, Greg
----- Original Message -----
From: "Gerard Samuel" <gsam
trini0.org>
To: "Greg Beaver" <greg
chiaraquartet.net>
Cc: <php-general
lists.php.net>
Sent: Thursday, January 09, 2003 12:24 AM
Subject: Re: [PHP] Re: Dynamic Regex
> What you suggested is what I was trying before. My original example
> was incorrect.
> Here is an good example for the variable holding the pattern ->
> $foo = '/\[url\]([a-z]+://.*?)\[/url\]/';
> This pattern would not work, but if I change it to
> $foo = '#\[url\]([a-z]+://.*?)\[/url\]#';
> It does work.
>
> Not complaining but just trying to figure out why the first version
> doesn't work for future references.
> Thanks
>
> Greg Beaver wrote:
>
> >Hi Gerard,
> >
> >all the preg_* functions require delimiters surrounding regular
expressions.
> >
> >$foo = '\[this\](.*?)that';
> >
> >should be by default:
> >
> >$foo = '/\[this\](.*?)that/';
> >
> >the code you tried uses # as the delimiter instead of /, an option preg_*
> >allows
> >
> >Take care,
> >Greg
> >--
> >phpDocumentor
> >http://www.phpdoc.org
> >
> >"Gerard Samuel" <gsam
trini0.org> wrote in message
> >news:3E1CC193.90605
trini0.org...
> >
> >
> >> The example doesn't have to make sense, but Im looking for the correct
> >>syntax for $foo. I was trying ->
> >>$foo = '\[this\](.*?)that';
> >>$bar = 'the other';
> >>
> >>$str = preg_replace($foo, $bar, $other_string);
> >>
> >>But that doesn't work. I came across an example where the syntax of
> >>$foo is in ->
> >>$foo = '#\[this\](.*?)that#';
> >>
> >>The second syntax of $foo works. I was wondering on the meaning of # in
> >>the string??
> >>
> >>Thanks
> >>
> >>--
> >>Gerard Samuel
> >>http://www.trini0.org:81/
> >>http://dev.trini0.org:81/
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >
>
> --
> Gerard Samuel
> http://www.trini0.org:81/
> http://dev.trini0.org:81/
>
>
>
>
attached mail follows:
Made sense. Thanks for your help.
Greg Beaver wrote:
>hi Gerard,
>
>I didn't think you were complaining :)
>
>the problem is in [/url]
>
>$foo = '/\[url\]([a-z]+://.*?)\[/url\]/';
>
>should be
>
>$foo = '/\[url\]([a-z]+://.*?)\[\/url\]/';
>
>that "/" was ending the pattern, and so preg_* was trying to read "url\]/"
>as closing information, and probably giving an odd error about "u" not being
>appropriate
>
>that's why # worked, because there were no other # in the string.
>
>Hope that answers the question (properly this time!)
>
>Take care,
>Greg
>
>----- Original Message -----
>From: "Gerard Samuel" <gsam
trini0.org>
>To: "Greg Beaver" <greg
chiaraquartet.net>
>Cc: <php-general
lists.php.net>
>Sent: Thursday, January 09, 2003 12:24 AM
>Subject: Re: [PHP] Re: Dynamic Regex
>
>
>
>
>> What you suggested is what I was trying before. My original example
>>was incorrect.
>>Here is an good example for the variable holding the pattern ->
>>$foo = '/\[url\]([a-z]+://.*?)\[/url\]/';
>>This pattern would not work, but if I change it to
>>$foo = '#\[url\]([a-z]+://.*?)\[/url\]#';
>>It does work.
>>
>>Not complaining but just trying to figure out why the first version
>>doesn't work for future references.
>>Thanks
>>
>>Greg Beaver wrote:
>>
>>
>>
>>>Hi Gerard,
>>>
>>>all the preg_* functions require delimiters surrounding regular
>>>
>>>
>expressions.
>
>
>>>$foo = '\[this\](.*?)that';
>>>
>>>should be by default:
>>>
>>>$foo = '/\[this\](.*?)that/';
>>>
>>>the code you tried uses # as the delimiter instead of /, an option preg_*
>>>allows
>>>
>>>Take care,
>>>Greg
>>>--
>>>phpDocumentor
>>>http://www.phpdoc.org
>>>
>>>"Gerard Samuel" <gsam
trini0.org> wrote in message
>>>news:3E1CC193.90605
trini0.org...
>>>
>>>
>>>
>>>
>>>> The example doesn't have to make sense, but Im looking for the correct
>>>>syntax for $foo. I was trying ->
>>>>$foo = '\[this\](.*?)that';
>>>>$bar = 'the other';
>>>>
>>>>$str = preg_replace($foo, $bar, $other_string);
>>>>
>>>>But that doesn't work. I came across an example where the syntax of
>>>>$foo is in ->
>>>>$foo = '#\[this\](.*?)that#';
>>>>
>>>>The second syntax of $foo works. I was wondering on the meaning of # in
>>>>the string??
>>>>
>>>>Thanks
>>>>
>>>>--
>>>>Gerard Samuel
>>>>http://www.trini0.org:81/
>>>>http://dev.trini0.org:81/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>--
>>Gerard Samuel
>>http://www.trini0.org:81/
>>http://dev.trini0.org:81/
>>
>>
>>
>>
>>
>>
>
>
>
>
>
-- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/
attached mail follows:
Yet another question: How would you make a variable's name the value of another variable? For example... Variable 1's value is "joe." I want to make the value of variabe one, or joe, the name of variable two which would equal something else.
Thanks, Stephen Craton http://www.melchior.us
"What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us
attached mail follows:
You are referring to Variables of Variables see:
http://www.php.net/manual/en/language.variables.variable.php
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
-----Original Message-----
From: Stephen [mailto:webmaster
melchior.us]
Sent: Thursday, 9 January 2003 10:52 AM
To: PHP List
Subject: [PHP] Variables
Yet another question: How would you make a variable's name the value of another variable? For example... Variable 1's value is "joe." I want to make the value of variabe one, or joe, the name of variable two which would equal something else.
Thanks, Stephen Craton http://www.melchior.us
"What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us
attached mail follows:
on 09/01/03 11:52 AM, Stephen (webmaster
melchior.us) wrote:
> Yet another question: How would you make a variable's name the value of > another variable? For example... Variable 1's value is "joe." I want to make > the value of variabe one, or joe, the name of variable two which would equal > something else.
Variable variables is what you want: http://www.php.net/manual/en/language.variables.variable.php
Justin
attached mail follows:
Sorry for so many questions but this should be the last one for a while.
I have a form that I want to insert into a MySQL table. This form is based on how many entries a user wants to enter. For example, a user wants to type in 12 names, so 12 form fields appear. Or they want 50, 50 appear. What I want to do is store them all into a database, but for one, I can't quit figure out how I can insert them, and second, even if I did know how, I couldn't possibly make enough tables unless I made 999 since I put the char limit to 3 digits. How could I work this keeping in mine any number between 1 and 999 could be entered and without making 999 tables?
Thanks, Stephen Craton http://www.melchior.us
"What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us
attached mail follows:
Do you require searching of this data eg... select via these numbers or not??
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
-----Original Message-----
From: Stephen [mailto:webmaster
melchior.us]
Sent: Thursday, 9 January 2003 11:56 AM
To: PHP List
Subject: [PHP] Stumped...
Sorry for so many questions but this should be the last one for a while.
I have a form that I want to insert into a MySQL table. This form is based on how many entries a user wants to enter. For example, a user wants to type in 12 names, so 12 form fields appear. Or they want 50, 50 appear. What I want to do is store them all into a database, but for one, I can't quit figure out how I can insert them, and second, even if I did know how, I couldn't possibly make enough tables unless I made 999 since I put the char limit to 3 digits. How could I work this keeping in mine any number between 1 and 999 could be entered and without making 999 tables?
Thanks, Stephen Craton http://www.melchior.us
"What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us
attached mail follows:
I will later select them and display them to be edited, but other then that, not really...
----- Original Message -----
From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
To: "'Stephen'" <webmaster
melchior.us>; "'PHP List'"
<php-general
lists.php.net>
Sent: Wednesday, January 08, 2003 8:58 PM
Subject: RE: [PHP] Stumped...
: Do you require searching of this data eg... select via these numbers or
: not??
:
:
: Timothy Hitchens (HiTCHO)
: Open Platform Consulting
: e-mail: tim
hitcho.com.au
:
:
: -----Original Message-----
: From: Stephen [mailto:webmaster
melchior.us]
: Sent: Thursday, 9 January 2003 11:56 AM
: To: PHP List
: Subject: [PHP] Stumped...
:
:
: Sorry for so many questions but this should be the last one for a while.
:
: I have a form that I want to insert into a MySQL table. This form is
: based on how many entries a user wants to enter. For example, a user
: wants to type in 12 names, so 12 form fields appear. Or they want 50, 50
: appear. What I want to do is store them all into a database, but for
: one, I can't quit figure out how I can insert them, and second, even if
: I did know how, I couldn't possibly make enough tables unless I made 999
: since I put the char limit to 3 digits. How could I work this keeping in
: mine any number between 1 and 999 could be entered and without making
: 999 tables?
:
: Thanks,
: Stephen Craton
: http://www.melchior.us
:
: "What's the point in appearance if your true love, doesn't care about
: it?" -- http://www.melchior.us
:
:
:
attached mail follows:
What you can do it simply get the data and create an array serialise the array and sent it to the database ... the issue that arises from this is that you can't select if that record has 45 and 786 etc etc
The other option you have is to create a table then a second table that has entries that show you which numbers it has:
Table 1:
Code Name etc
Table 2:
Code Number
You will end up with multiple numbers listed in table 2 but you can then easily find everyone with number 45.
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Stephen [mailto:webmaster
melchior.us]
> Sent: Thursday, 9 January 2003 12:00 PM
> To: Timothy Hitchens (HiTCHO)
> Cc: PHP List
> Subject: Re: [PHP] Stumped...
>
>
> I will later select them and display them to be edited, but
> other then that, not really...
>
>
> ----- Original Message -----
> From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
> To: "'Stephen'" <webmaster
melchior.us>; "'PHP List'"
> <php-general
lists.php.net>
> Sent: Wednesday, January 08, 2003 8:58 PM
> Subject: RE: [PHP] Stumped...
>
>
> : Do you require searching of this data eg... select via
> these numbers or
> : not??
> :
> :
> : Timothy Hitchens (HiTCHO)
> : Open Platform Consulting
> : e-mail: tim
hitcho.com.au
> :
> :
> : -----Original Message-----
> : From: Stephen [mailto:webmaster
melchior.us]
> : Sent: Thursday, 9 January 2003 11:56 AM
> : To: PHP List
> : Subject: [PHP] Stumped...
> :
> :
> : Sorry for so many questions but this should be the last one
> for a while.
> :
> : I have a form that I want to insert into a MySQL table. This form is
> : based on how many entries a user wants to enter. For example, a user
> : wants to type in 12 names, so 12 form fields appear. Or
> they want 50, 50
> : appear. What I want to do is store them all into a database, but for
> : one, I can't quit figure out how I can insert them, and
> second, even if
> : I did know how, I couldn't possibly make enough tables
> unless I made 999
> : since I put the char limit to 3 digits. How could I work
> this keeping in
> : mine any number between 1 and 999 could be entered and
> without making
> : 999 tables?
> :
> : Thanks,
> : Stephen Craton
> : http://www.melchior.us
> :
> : "What's the point in appearance if your true love, doesn't
> care about
> : it?" -- http://www.melchior.us
> :
> :
> :
>
>
attached mail follows:
How would I serialise it? I can make the numbers into an array, but if I echo the array itself, I'd get "Array" and I need the number in the db, not the word...
----- Original Message -----
From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
To: "'Stephen'" <webmaster
melchior.us>
Cc: "'PHP List'" <php-general
lists.php.net>
Sent: Wednesday, January 08, 2003 9:09 PM
Subject: RE: [PHP] Stumped...
: What you can do it simply get the data and create an array serialise the
: array and sent it to
: the database ... the issue that arises from this is that you can't
: select if that record has
: 45 and 786 etc etc
:
: The other option you have is to create a table then a second table that
: has entries that show
: you which numbers it has:
:
: Table 1:
:
: Code
: Name
: etc
:
: Table 2:
:
: Code
: Number
:
: You will end up with multiple numbers listed in table 2 but you can then
: easily find everyone with number 45.
:
:
:
: Timothy Hitchens (HiTCHO)
: Open Platform Consulting
: e-mail: tim
hitcho.com.au
:
: > -----Original Message-----
: > From: Stephen [mailto:webmaster
melchior.us]
: > Sent: Thursday, 9 January 2003 12:00 PM
: > To: Timothy Hitchens (HiTCHO)
: > Cc: PHP List
: > Subject: Re: [PHP] Stumped...
: >
: >
: > I will later select them and display them to be edited, but
: > other then that, not really...
: >
: >
: > ----- Original Message -----
: > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > To: "'Stephen'" <webmaster
melchior.us>; "'PHP List'"
: > <php-general
lists.php.net>
: > Sent: Wednesday, January 08, 2003 8:58 PM
: > Subject: RE: [PHP] Stumped...
: >
: >
: > : Do you require searching of this data eg... select via
: > these numbers or
: > : not??
: > :
: > :
: > : Timothy Hitchens (HiTCHO)
: > : Open Platform Consulting
: > : e-mail: tim
hitcho.com.au
: > :
: > :
: > : -----Original Message-----
: > : From: Stephen [mailto:webmaster
melchior.us]
: > : Sent: Thursday, 9 January 2003 11:56 AM
: > : To: PHP List
: > : Subject: [PHP] Stumped...
: > :
: > :
: > : Sorry for so many questions but this should be the last one
: > for a while.
: > :
: > : I have a form that I want to insert into a MySQL table. This form is
: > : based on how many entries a user wants to enter. For example, a user
: > : wants to type in 12 names, so 12 form fields appear. Or
: > they want 50, 50
: > : appear. What I want to do is store them all into a database, but for
: > : one, I can't quit figure out how I can insert them, and
: > second, even if
: > : I did know how, I couldn't possibly make enough tables
: > unless I made 999
: > : since I put the char limit to 3 digits. How could I work
: > this keeping in
: > : mine any number between 1 and 999 could be entered and
: > without making
: > : 999 tables?
: > :
: > : Thanks,
: > : Stephen Craton
: > : http://www.melchior.us
: > :
: > : "What's the point in appearance if your true love, doesn't
: > care about
: > : it?" -- http://www.melchior.us
: > :
: > :
: > :
: >
: >
:
:
:
attached mail follows:
Check out:
http://www.php.net/manual/en/function.serialize.php
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Stephen [mailto:webmaster
melchior.us]
> Sent: Thursday, 9 January 2003 12:13 PM
> To: Timothy Hitchens (HiTCHO)
> Cc: PHP List
> Subject: Re: [PHP] Stumped...
>
>
> How would I serialise it? I can make the numbers into an
> array, but if I echo the array itself, I'd get "Array" and I
> need the number in the db, not the word...
>
>
> ----- Original Message -----
> From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
> To: "'Stephen'" <webmaster
melchior.us>
> Cc: "'PHP List'" <php-general
lists.php.net>
> Sent: Wednesday, January 08, 2003 9:09 PM
> Subject: RE: [PHP] Stumped...
>
>
> : What you can do it simply get the data and create an array
> serialise the
> : array and sent it to
> : the database ... the issue that arises from this is that you can't
> : select if that record has
> : 45 and 786 etc etc
> :
> : The other option you have is to create a table then a
> second table that
> : has entries that show
> : you which numbers it has:
> :
> : Table 1:
> :
> : Code
> : Name
> : etc
> :
> : Table 2:
> :
> : Code
> : Number
> :
> : You will end up with multiple numbers listed in table 2 but
> you can then
> : easily find everyone with number 45.
> :
> :
> :
> : Timothy Hitchens (HiTCHO)
> : Open Platform Consulting
> : e-mail: tim
hitcho.com.au
> :
> : > -----Original Message-----
> : > From: Stephen [mailto:webmaster
melchior.us]
> : > Sent: Thursday, 9 January 2003 12:00 PM
> : > To: Timothy Hitchens (HiTCHO)
> : > Cc: PHP List
> : > Subject: Re: [PHP] Stumped...
> : >
> : >
> : > I will later select them and display them to be edited, but
> : > other then that, not really...
> : >
> : >
> : > ----- Original Message -----
> : > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
> : > To: "'Stephen'" <webmaster
melchior.us>; "'PHP List'"
> : > <php-general
lists.php.net>
> : > Sent: Wednesday, January 08, 2003 8:58 PM
> : > Subject: RE: [PHP] Stumped...
> : >
> : >
> : > : Do you require searching of this data eg... select via
> : > these numbers or
> : > : not??
> : > :
> : > :
> : > : Timothy Hitchens (HiTCHO)
> : > : Open Platform Consulting
> : > : e-mail: tim
hitcho.com.au
> : > :
> : > :
> : > : -----Original Message-----
> : > : From: Stephen [mailto:webmaster
melchior.us]
> : > : Sent: Thursday, 9 January 2003 11:56 AM
> : > : To: PHP List
> : > : Subject: [PHP] Stumped...
> : > :
> : > :
> : > : Sorry for so many questions but this should be the last one
> : > for a while.
> : > :
> : > : I have a form that I want to insert into a MySQL table.
> This form is
> : > : based on how many entries a user wants to enter. For
> example, a user
> : > : wants to type in 12 names, so 12 form fields appear. Or
> : > they want 50, 50
> : > : appear. What I want to do is store them all into a
> database, but for
> : > : one, I can't quit figure out how I can insert them, and
> : > second, even if
> : > : I did know how, I couldn't possibly make enough tables
> : > unless I made 999
> : > : since I put the char limit to 3 digits. How could I work
> : > this keeping in
> : > : mine any number between 1 and 999 could be entered and
> : > without making
> : > : 999 tables?
> : > :
> : > : Thanks,
> : > : Stephen Craton
> : > : http://www.melchior.us
> : > :
> : > : "What's the point in appearance if your true love, doesn't
> : > care about
> : > : it?" -- http://www.melchior.us
> : > :
> : > :
> : > :
> : >
> : >
> :
> :
> :
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Ok, I decided another easier way to do it but I have a problem now. Since the text field contains a $ sign, PHP wants to take it as a variable so it prints out nothing... Here's my code for getting the value to import into the table:
$variable = ''; for($i = 1; $i <= $vars; $i++) { $tempvar = 'var'.$i; $variable .= $$tempvar.','; }
All this gives me is this since I have three fields input:
,,,
Even if I substr() out the $ sign, it still gives a blank value. Anyone have any ideas how to fix this?
----- Original Message -----
From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
To: "'Stephen'" <webmaster
melchior.us>
Sent: Wednesday, January 08, 2003 9:30 PM
Subject: RE: [PHP] Stumped...
: The issue with the serialise option is that is you have then in a row
: they are serialised
: and you can't do "SELECT * FROM accounts WHERE num_rec LIKE '5'" you
: would have to create
: two tables as per my previous idea or you can simple implode into a coma
: separated string
: and put into database and then you could use LIKE as per above.
:
:
:
: Timothy Hitchens (HiTCHO)
: Open Platform Consulting
: e-mail: tim
hitcho.com.au
:
: > -----Original Message-----
: > From: Stephen [mailto:webmaster
melchior.us]
: > Sent: Thursday, 9 January 2003 12:28 PM
: > To: Timothy Hitchens (HiTCHO)
: > Subject: Re: [PHP] Stumped...
: >
: >
: > Thank you much, but what did you mean I can't store numbers
: > up to 45, 768, etc?
: > ----- Original Message -----
: > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > To: "'PHP List'" <php-general
lists.php.net>
: > Sent: Wednesday, January 08, 2003 9:21 PM
: > Subject: RE: [PHP] Stumped...
: >
: >
: > : Check out:
: > :
: > : http://www.php.net/manual/en/function.serialize.php
: > :
: > : Timothy Hitchens (HiTCHO)
: > : Open Platform Consulting
: > : e-mail: tim
hitcho.com.au
: > :
: > : > -----Original Message-----
: > : > From: Stephen [mailto:webmaster
melchior.us]
: > : > Sent: Thursday, 9 January 2003 12:13 PM
: > : > To: Timothy Hitchens (HiTCHO)
: > : > Cc: PHP List
: > : > Subject: Re: [PHP] Stumped...
: > : >
: > : >
: > : > How would I serialise it? I can make the numbers into an
: > : > array, but if I echo the array itself, I'd get "Array" and I
: > : > need the number in the db, not the word...
: > : >
: > : >
: > : > ----- Original Message -----
: > : > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > : > To: "'Stephen'" <webmaster
melchior.us>
: > : > Cc: "'PHP List'" <php-general
lists.php.net>
: > : > Sent: Wednesday, January 08, 2003 9:09 PM
: > : > Subject: RE: [PHP] Stumped...
: > : >
: > : >
: > : > : What you can do it simply get the data and create an array
: > : > serialise the
: > : > : array and sent it to
: > : > : the database ... the issue that arises from this is
: > that you can't
: > : > : select if that record has
: > : > : 45 and 786 etc etc
: > : > :
: > : > : The other option you have is to create a table then a
: > : > second table that
: > : > : has entries that show
: > : > : you which numbers it has:
: > : > :
: > : > : Table 1:
: > : > :
: > : > : Code
: > : > : Name
: > : > : etc
: > : > :
: > : > : Table 2:
: > : > :
: > : > : Code
: > : > : Number
: > : > :
: > : > : You will end up with multiple numbers listed in table 2 but
: > : > you can then
: > : > : easily find everyone with number 45.
: > : > :
: > : > :
: > : > :
: > : > : Timothy Hitchens (HiTCHO)
: > : > : Open Platform Consulting
: > : > : e-mail: tim
hitcho.com.au
: > : > :
: > : > : > -----Original Message-----
: > : > : > From: Stephen [mailto:webmaster
melchior.us]
: > : > : > Sent: Thursday, 9 January 2003 12:00 PM
: > : > : > To: Timothy Hitchens (HiTCHO)
: > : > : > Cc: PHP List
: > : > : > Subject: Re: [PHP] Stumped...
: > : > : >
: > : > : >
: > : > : > I will later select them and display them to be edited, but
: > : > : > other then that, not really...
: > : > : >
: > : > : >
: > : > : > ----- Original Message -----
: > : > : > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > : > : > To: "'Stephen'" <webmaster
melchior.us>; "'PHP List'"
: > : > : > <php-general
lists.php.net>
: > : > : > Sent: Wednesday, January 08, 2003 8:58 PM
: > : > : > Subject: RE: [PHP] Stumped...
: > : > : >
: > : > : >
: > : > : > : Do you require searching of this data eg... select via
: > : > : > these numbers or
: > : > : > : not??
: > : > : > :
: > : > : > :
: > : > : > : Timothy Hitchens (HiTCHO)
: > : > : > : Open Platform Consulting
: > : > : > : e-mail: tim
hitcho.com.au
: > : > : > :
: > : > : > :
: > : > : > : -----Original Message-----
: > : > : > : From: Stephen [mailto:webmaster
melchior.us]
: > : > : > : Sent: Thursday, 9 January 2003 11:56 AM
: > : > : > : To: PHP List
: > : > : > : Subject: [PHP] Stumped...
: > : > : > :
: > : > : > :
: > : > : > : Sorry for so many questions but this should be the last one
: > : > : > for a while.
: > : > : > :
: > : > : > : I have a form that I want to insert into a MySQL table.
: > : > This form is
: > : > : > : based on how many entries a user wants to enter. For
: > : > example, a user
: > : > : > : wants to type in 12 names, so 12 form fields appear. Or
: > : > : > they want 50, 50
: > : > : > : appear. What I want to do is store them all into a
: > : > database, but for
: > : > : > : one, I can't quit figure out how I can insert them, and
: > : > : > second, even if
: > : > : > : I did know how, I couldn't possibly make enough tables
: > : > : > unless I made 999
: > : > : > : since I put the char limit to 3 digits. How could I work
: > : > : > this keeping in
: > : > : > : mine any number between 1 and 999 could be entered and
: > : > : > without making
: > : > : > : 999 tables?
: > : > : > :
: > : > : > : Thanks,
: > : > : > : Stephen Craton
: > : > : > : http://www.melchior.us
: > : > : > :
: > : > : > : "What's the point in appearance if your true love, doesn't
: > : > : > care about
: > : > : > : it?" -- http://www.melchior.us
: > : > : > :
: > : > : > :
: > : > : > :
: > : > : >
: > : > : >
: > : > :
: > : > :
: > : > :
: > : >
: > : >
: > : >
: > : > --
: > : > 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
: > :
: > :
: > :
: >
: >
:
:
attached mail follows:
Don't write code which requires register_globals to be on.
$variable = $_POST['$var'];
-----Original Message-----
From: Stephen [mailto:webmaster
melchior.us]
Sent: Thursday, 9 January 2003 3:03 PM
To: Timothy Hitchens (HiTCHO)
Cc: PHP List
Subject: Re: [PHP] Stumped...
Ok, I decided another easier way to do it but I have a problem now. Since the text field contains a $ sign, PHP wants to take it as a variable so it prints out nothing... Here's my code for getting the value to import into the table:
$variable = ''; for($i = 1; $i <= $vars; $i++) { $tempvar = 'var'.$i; $variable .= $$tempvar.','; }
All this gives me is this since I have three fields input:
,,,
Even if I substr() out the $ sign, it still gives a blank value. Anyone have any ideas how to fix this?
----- Original Message -----
From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
To: "'Stephen'" <webmaster
melchior.us>
Sent: Wednesday, January 08, 2003 9:30 PM
Subject: RE: [PHP] Stumped...
: The issue with the serialise option is that is you have then in a row
: they are serialised
: and you can't do "SELECT * FROM accounts WHERE num_rec LIKE '5'" you
: would have to create
: two tables as per my previous idea or you can simple implode into a coma
: separated string
: and put into database and then you could use LIKE as per above.
:
:
:
: Timothy Hitchens (HiTCHO)
: Open Platform Consulting
: e-mail: tim
hitcho.com.au
:
: > -----Original Message-----
: > From: Stephen [mailto:webmaster
melchior.us]
: > Sent: Thursday, 9 January 2003 12:28 PM
: > To: Timothy Hitchens (HiTCHO)
: > Subject: Re: [PHP] Stumped...
: >
: >
: > Thank you much, but what did you mean I can't store numbers
: > up to 45, 768, etc?
: > ----- Original Message -----
: > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > To: "'PHP List'" <php-general
lists.php.net>
: > Sent: Wednesday, January 08, 2003 9:21 PM
: > Subject: RE: [PHP] Stumped...
: >
: >
: > : Check out:
: > :
: > : http://www.php.net/manual/en/function.serialize.php
: > :
: > : Timothy Hitchens (HiTCHO)
: > : Open Platform Consulting
: > : e-mail: tim
hitcho.com.au
: > :
: > : > -----Original Message-----
: > : > From: Stephen [mailto:webmaster
melchior.us]
: > : > Sent: Thursday, 9 January 2003 12:13 PM
: > : > To: Timothy Hitchens (HiTCHO)
: > : > Cc: PHP List
: > : > Subject: Re: [PHP] Stumped...
: > : >
: > : >
: > : > How would I serialise it? I can make the numbers into an
: > : > array, but if I echo the array itself, I'd get "Array" and I
: > : > need the number in the db, not the word...
: > : >
: > : >
: > : > ----- Original Message -----
: > : > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > : > To: "'Stephen'" <webmaster
melchior.us>
: > : > Cc: "'PHP List'" <php-general
lists.php.net>
: > : > Sent: Wednesday, January 08, 2003 9:09 PM
: > : > Subject: RE: [PHP] Stumped...
: > : >
: > : >
: > : > : What you can do it simply get the data and create an array
: > : > serialise the
: > : > : array and sent it to
: > : > : the database ... the issue that arises from this is
: > that you can't
: > : > : select if that record has
: > : > : 45 and 786 etc etc
: > : > :
: > : > : The other option you have is to create a table then a
: > : > second table that
: > : > : has entries that show
: > : > : you which numbers it has:
: > : > :
: > : > : Table 1:
: > : > :
: > : > : Code
: > : > : Name
: > : > : etc
: > : > :
: > : > : Table 2:
: > : > :
: > : > : Code
: > : > : Number
: > : > :
: > : > : You will end up with multiple numbers listed in table 2 but
: > : > you can then
: > : > : easily find everyone with number 45.
: > : > :
: > : > :
: > : > :
: > : > : Timothy Hitchens (HiTCHO)
: > : > : Open Platform Consulting
: > : > : e-mail: tim
hitcho.com.au
: > : > :
: > : > : > -----Original Message-----
: > : > : > From: Stephen [mailto:webmaster
melchior.us]
: > : > : > Sent: Thursday, 9 January 2003 12:00 PM
: > : > : > To: Timothy Hitchens (HiTCHO)
: > : > : > Cc: PHP List
: > : > : > Subject: Re: [PHP] Stumped...
: > : > : >
: > : > : >
: > : > : > I will later select them and display them to be edited, but
: > : > : > other then that, not really...
: > : > : >
: > : > : >
: > : > : > ----- Original Message -----
: > : > : > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > : > : > To: "'Stephen'" <webmaster
melchior.us>; "'PHP List'"
: > : > : > <php-general
lists.php.net>
: > : > : > Sent: Wednesday, January 08, 2003 8:58 PM
: > : > : > Subject: RE: [PHP] Stumped...
: > : > : >
: > : > : >
: > : > : > : Do you require searching of this data eg... select via
: > : > : > these numbers or
: > : > : > : not??
: > : > : > :
: > : > : > :
: > : > : > : Timothy Hitchens (HiTCHO)
: > : > : > : Open Platform Consulting
: > : > : > : e-mail: tim
hitcho.com.au
: > : > : > :
: > : > : > :
: > : > : > : -----Original Message-----
: > : > : > : From: Stephen [mailto:webmaster
melchior.us]
: > : > : > : Sent: Thursday, 9 January 2003 11:56 AM
: > : > : > : To: PHP List
: > : > : > : Subject: [PHP] Stumped...
: > : > : > :
: > : > : > :
: > : > : > : Sorry for so many questions but this should be the last one
: > : > : > for a while.
: > : > : > :
: > : > : > : I have a form that I want to insert into a MySQL table.
: > : > This form is
: > : > : > : based on how many entries a user wants to enter. For
: > : > example, a user
: > : > : > : wants to type in 12 names, so 12 form fields appear. Or
: > : > : > they want 50, 50
: > : > : > : appear. What I want to do is store them all into a
: > : > database, but for
: > : > : > : one, I can't quit figure out how I can insert them, and
: > : > : > second, even if
: > : > : > : I did know how, I couldn't possibly make enough tables
: > : > : > unless I made 999
: > : > : > : since I put the char limit to 3 digits. How could I work
: > : > : > this keeping in
: > : > : > : mine any number between 1 and 999 could be entered and
: > : > : > without making
: > : > : > : 999 tables?
: > : > : > :
: > : > : > : Thanks,
: > : > : > : Stephen Craton
: > : > : > : http://www.melchior.us
: > : > : > :
: > : > : > : "What's the point in appearance if your true love, doesn't
: > : > : > care about
: > : > : > : it?" -- http://www.melchior.us
: > : > : > :
: > : > : > :
: > : > : > :
: > : > : >
: > : > : >
: > : > :
: > : > :
: > : > :
: > : >
: > : >
: > : >
: > : > --
: > : > 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
: > :
: > :
: > :
: >
: >
:
:
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Please note the single quotes.
Using double quotes:
$variable = $_POST["$var"];
will not work, because you don't have a variable named $var in your code.
Have a look at
http://www.php.net/manual/en/language.types.string.php
-----Original Message-----
From: Sean Malloy [mailto:sean
element.net.au]
Sent: Thursday, 9 January 2003 3:18 PM
To: Stephen; PHP List
Subject: RE: [PHP] Stumped...
Don't write code which requires register_globals to be on.
$variable = $_POST['$var'];
-----Original Message-----
From: Stephen [mailto:webmaster
melchior.us]
Sent: Thursday, 9 January 2003 3:03 PM
To: Timothy Hitchens (HiTCHO)
Cc: PHP List
Subject: Re: [PHP] Stumped...
Ok, I decided another easier way to do it but I have a problem now. Since the text field contains a $ sign, PHP wants to take it as a variable so it prints out nothing... Here's my code for getting the value to import into the table:
$variable = ''; for($i = 1; $i <= $vars; $i++) { $tempvar = 'var'.$i; $variable .= $$tempvar.','; }
All this gives me is this since I have three fields input:
,,,
Even if I substr() out the $ sign, it still gives a blank value. Anyone have any ideas how to fix this?
----- Original Message -----
From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
To: "'Stephen'" <webmaster
melchior.us>
Sent: Wednesday, January 08, 2003 9:30 PM
Subject: RE: [PHP] Stumped...
: The issue with the serialise option is that is you have then in a row
: they are serialised
: and you can't do "SELECT * FROM accounts WHERE num_rec LIKE '5'" you
: would have to create
: two tables as per my previous idea or you can simple implode into a coma
: separated string
: and put into database and then you could use LIKE as per above.
:
:
:
: Timothy Hitchens (HiTCHO)
: Open Platform Consulting
: e-mail: tim
hitcho.com.au
:
: > -----Original Message-----
: > From: Stephen [mailto:webmaster
melchior.us]
: > Sent: Thursday, 9 January 2003 12:28 PM
: > To: Timothy Hitchens (HiTCHO)
: > Subject: Re: [PHP] Stumped...
: >
: >
: > Thank you much, but what did you mean I can't store numbers
: > up to 45, 768, etc?
: > ----- Original Message -----
: > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > To: "'PHP List'" <php-general
lists.php.net>
: > Sent: Wednesday, January 08, 2003 9:21 PM
: > Subject: RE: [PHP] Stumped...
: >
: >
: > : Check out:
: > :
: > : http://www.php.net/manual/en/function.serialize.php
: > :
: > : Timothy Hitchens (HiTCHO)
: > : Open Platform Consulting
: > : e-mail: tim
hitcho.com.au
: > :
: > : > -----Original Message-----
: > : > From: Stephen [mailto:webmaster
melchior.us]
: > : > Sent: Thursday, 9 January 2003 12:13 PM
: > : > To: Timothy Hitchens (HiTCHO)
: > : > Cc: PHP List
: > : > Subject: Re: [PHP] Stumped...
: > : >
: > : >
: > : > How would I serialise it? I can make the numbers into an
: > : > array, but if I echo the array itself, I'd get "Array" and I
: > : > need the number in the db, not the word...
: > : >
: > : >
: > : > ----- Original Message -----
: > : > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > : > To: "'Stephen'" <webmaster
melchior.us>
: > : > Cc: "'PHP List'" <php-general
lists.php.net>
: > : > Sent: Wednesday, January 08, 2003 9:09 PM
: > : > Subject: RE: [PHP] Stumped...
: > : >
: > : >
: > : > : What you can do it simply get the data and create an array
: > : > serialise the
: > : > : array and sent it to
: > : > : the database ... the issue that arises from this is
: > that you can't
: > : > : select if that record has
: > : > : 45 and 786 etc etc
: > : > :
: > : > : The other option you have is to create a table then a
: > : > second table that
: > : > : has entries that show
: > : > : you which numbers it has:
: > : > :
: > : > : Table 1:
: > : > :
: > : > : Code
: > : > : Name
: > : > : etc
: > : > :
: > : > : Table 2:
: > : > :
: > : > : Code
: > : > : Number
: > : > :
: > : > : You will end up with multiple numbers listed in table 2 but
: > : > you can then
: > : > : easily find everyone with number 45.
: > : > :
: > : > :
: > : > :
: > : > : Timothy Hitchens (HiTCHO)
: > : > : Open Platform Consulting
: > : > : e-mail: tim
hitcho.com.au
: > : > :
: > : > : > -----Original Message-----
: > : > : > From: Stephen [mailto:webmaster
melchior.us]
: > : > : > Sent: Thursday, 9 January 2003 12:00 PM
: > : > : > To: Timothy Hitchens (HiTCHO)
: > : > : > Cc: PHP List
: > : > : > Subject: Re: [PHP] Stumped...
: > : > : >
: > : > : >
: > : > : > I will later select them and display them to be edited, but
: > : > : > other then that, not really...
: > : > : >
: > : > : >
: > : > : > ----- Original Message -----
: > : > : > From: "Timothy Hitchens (HiTCHO)" <phplists
hitcho.com.au>
: > : > : > To: "'Stephen'" <webmaster
melchior.us>; "'PHP List'"
: > : > : > <php-general
lists.php.net>
: > : > : > Sent: Wednesday, January 08, 2003 8:58 PM
: > : > : > Subject: RE: [PHP] Stumped...
: > : > : >
: > : > : >
: > : > : > : Do you require searching of this data eg... select via
: > : > : > these numbers or
: > : > : > : not??
: > : > : > :
: > : > : > :
: > : > : > : Timothy Hitchens (HiTCHO)
: > : > : > : Open Platform Consulting
: > : > : > : e-mail: tim
hitcho.com.au
: > : > : > :
: > : > : > :
: > : > : > : -----Original Message-----
: > : > : > : From: Stephen [mailto:webmaster
melchior.us]
: > : > : > : Sent: Thursday, 9 January 2003 11:56 AM
: > : > : > : To: PHP List
: > : > : > : Subject: [PHP] Stumped...
: > : > : > :
: > : > : > :
: > : > : > : Sorry for so many questions but this should be the last one
: > : > : > for a while.
: > : > : > :
: > : > : > : I have a form that I want to insert into a MySQL table.
: > : > This form is
: > : > : > : based on how many entries a user wants to enter. For
: > : > example, a user
: > : > : > : wants to type in 12 names, so 12 form fields appear. Or
: > : > : > they want 50, 50
: > : > : > : appear. What I want to do is store them all into a
: > : > database, but for
: > : > : > : one, I can't quit figure out how I can insert them, and
: > : > : > second, even if
: > : > : > : I did know how, I couldn't possibly make enough tables
: > : > : > unless I made 999
: > : > : > : since I put the char limit to 3 digits. How could I work
: > : > : > this keeping in
: > : > : > : mine any number between 1 and 999 could be entered and
: > : > : > without making
: > : > : > : 999 tables?
: > : > : > :
: > : > : > : Thanks,
: > : > : > : Stephen Craton
: > : > : > : http://www.melchior.us
: > : > : > :
: > : > : > : "What's the point in appearance if your true love, doesn't
: > : > : > care about
: > : > : > : it?" -- http://www.melchior.us
: > : > : > :
: > : > : > :
: > : > : > :
: > : > : >
: > : > : >
: > : > :
: > : > :
: > : > :
: > : >
: > : >
: > : >
: > : > --
: > : > 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
: > :
: > :
: > :
: >
: >
:
:
-- 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
attached mail follows:
I am trying to run a PHP page from my browser (Mozilla) and each time I load the page it is attempting to force a dowload of the page instead, based on the mime-type. I had been developing a command line PHP application which works fine and then had just started on a web interface and realised that Apache may not be configured correctly. So I edited httpd.conf and added the Add Type line for x-type-httpd .php. I am running Apache 2.0.40 on RedHat 8 and PHP 4.3.0pre2. Can anyone tell me what I am doing wrong? What should the modifications be to httpd.conf for PHP?
Thanks in advance
attached mail follows:
Your settings should be something similar to this:
<IfModule mod_php4.c> AddType application/x-httpd-php .php .html AddType application/x-httpd-php-source .phps </IfModule>
Do you have the page remotely available to see what is happening for you??
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Gareth Thomas [mailto:gdthomas
mercurysoft.com]
> Sent: Thursday, 9 January 2003 12:03 PM
> To: php-general
lists.php.net
> Subject: [PHP] apache and php
>
>
> I am trying to run a PHP page from my browser (Mozilla) and
> each time I load the page it is attempting to force a dowload
> of the page instead, based on the mime-type. I had been
> developing a command line PHP application which works fine
> and then had just started on a web interface and realised
> that Apache may not be configured correctly. So I edited
> httpd.conf and added the Add Type line for x-type-httpd .php.
> I am running Apache 2.0.40 on RedHat 8 and PHP 4.3.0pre2. Can
> anyone tell me what I am doing wrong? What should the
> modifications be to httpd.conf for PHP?
>
> Thanks in advance
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
I need to be able to just extract the number that is right Under blocks in this example it is the number 57070. This was generated by the quota -g groupname command.
Disk quotas for group site53 (gid 165): Filesystem blocks quota limit grace files quota limit grace /dev/hda4 57070 307201 307200 1146 0 0
I have tried using some of the string functions like I used $test=strstr ($test, "hda"); $test= substr("$test",7); This well get me up to the start of the number but now I need to get read of every thing after the number. Is there a better way of getting this info or for striping all the other stuff away.
-- Best regards, rdkurth mailto:rdkurthstarband.net
attached mail follows:
Give this a shot ... a bit of a hack but works for you:
<?php
$string = '
Disk quotas for group site53 (gid 165): Filesystem blocks quota limit grace files quota limit grace /dev/hda4 57070 307201 307200 1146 0 0
';
$test = strstr($string, 'hda');
// replace two spaces with one - ensure differences in quota function doesn't effect $test = eregi_replace(' ', ' ', $test);
// split on spaces $test = explode(' ', $test);
echo trim($test[2]);
?>
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: rdkurth
starband.net [mailto:rdkurth
starband.net]
> Sent: Thursday, 9 January 2003 12:17 PM
> To: php-general
> Subject: [PHP] How to strip extra characters off of a string
>
>
>
> I need to be able to just extract the number that is right
> Under blocks in this example it is the number 57070. This was
> generated by the quota -g groupname command.
>
> Disk quotas for group site53 (gid 165):
> Filesystem blocks quota limit grace files
> quota limit grace
> /dev/hda4 57070 307201 307200 1146
> 0 0
>
> I have tried using some of the string
> functions like I used
> $test=strstr ($test, "hda");
> $test= substr("$test",7);
> This well get me up to the start of the number but now I need
> to get read of every thing after the number. Is there a
> better way of getting this info or for striping all the other
> stuff away.
>
>
>
>
> --
> Best regards,
> rdkurth mailto:rdkurth
starband.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
rdkurth
starband.net wrote:
>
> I need to be able to just extract the number that is right Under
> blocks in this example it is the number 57070. This was generated by
> the quota -g groupname command.
>
> Disk quotas for group site53 (gid 165):
> Filesystem blocks quota limit grace files quota limit grace
> /dev/hda4 57070 307201 307200 1146 0 0
>
> I have tried using some of the string
> functions like I used
> $test=strstr ($test, "hda");
> $test= substr("$test",7);
Have a look at explode(). You could do something like this:
$test=strstr ($test, "hda"); $test= substr("$test",7); $aValues = explode(" ", $test); list($fs, $blocks, $quota, $limit, $rest_of_string) = each ($aValues, 4);
Jc
attached mail follows:
Try using the $_files['photo']['error'] variable to see if the file is acutaly being uploaded correctly. I had the same problem on Windows XP, but i discovered the file was only half-uploaded using this.
- Daniel "TheHeadSage" Spain
Founder of Voidsoft.
theheadsage
manga-sketchbook.org
~ Manga Sketchbook, the best Manga Scanlation group! ~
On 8 Jan 2003 at 21:35, Submission.org.ru Team wrote:
> Hello php-general,
> I'm trying to figure out why I can't upload any file in php.
>
> Form code
> ========
> <form name="photoform" action="photos.php" method="post" enctype="multipart/form-data">
> <input type="hidden" name="MAX_FILE_SIZE" value="40960">
> <table border="0" cellspacing="0" cellpadding="2">
> <tr>
> <td colspan="2" class="emphasis">Use this form to upload your new photographs. Note: only JPEG (.jpg) and PNG (.png) files allowed. Maximimum allowed file size is 40KB.</td>
> </tr>
> <tr>
> <td>Photograph: </td>
> <td><input type="file" name="photo" /></td>
> </tr>
> <tr>
> <td>Description: </td>
> <td>
> <textarea name="photodesc" rows="3" cols="30"><?php echo $_POST["photodesc"] ?></textarea>
> </td>
> </tr>
> <tr>
> <td colspan="2" align="center"><input type="submit" name="fileupload" value="Upload" /></td>
> </tr>
> </table>
> </form>
>
> PHP code
> =======
> <?php
> if ($_POST["fileupload"] == "Upload") {
> $errormsg = "";
> $photospath ="/home/freeman/upload";
> $filename = $_FILES['photo']['name'];
> $filetype = $_FILES['photo']['type'];
> $filesize = (int) $_FILES['photo']['size'];
>
> if ($filetype == "image/jpeg" || $filetype == "image/pjpeg" || $filetype == "image/png" || $filetype == "image/x-png") {
> if ($filesize < 40960 && $filesize > 0) {
> $storename = $uniqueid = md5 (uniqid (rand));
> if ($filetype == "image/jpeg" || $filetype == "image/pjpeg") $storename .= ".jpg";
> if ($filename == "image/png" || $filetype == "image/x-png") $storename .= ".png";
> $desc = $_POST["photodesc"];
>
> // Store the file in the photos folder and add record to database
> if (is_uploaded_file ($_FILES['photo']['tmp_name'])) {
> if (!
move_uploaded_file ($_FILES['photo']['tmp_name'], $photospath.$storename)) {
> $errormsg .= " Problem uploading the file. Please try again. If the problem persists please email support
huntclubservices.com to report the error.";
> } else {
>
chmod ($photospath.$storename, 0644);
> $sql = "INSERT INTO hcs_photos (clientID,photoName,photoTitle,uploadTimeStamp) VALUES ('". $_SESSION["clientID"] ."','$storename','$desc','$timestamp')";
> $db->Query ($sql, $conn);
> }
>
> } else {
> $errormsg .= "Possible file upload attack. Filename: ". $_FILES['photo']['name'];
> }
> } else {
> $errormsg .= "Invalid file size. Maximum of 40KB allowed";
> }
> } else {
> $errormsg .= "Invalid file type. Only JPEG and PNG files allowed";
> }
> if (strlen ($errormsg) < 5) {
> header ("Location: ". $baseurl ."photos.php");
> }
> }
> ?>
>
> When I upload a file I get
> $filesize equal to 0.
>
> In my php.ini i got the following section:
> ; Whether to allow HTTP file uploads.
> file_uploads = On
>
> ; Temporary directory for HTTP uploaded files (will use system default if not
> ; specified).
> upload_tmp_dir = "/tmp"
>
> ; Maximum allowed size for uploaded files.
> upload_max_filesize = 2M
>
>
> Please help. PHP even does not create a temp file in a temp directory.
> /tmp got permission 777
>
> I'm running Apache 2.0.43 and RedHat Linux
>
> --
> Best regards,
> Submission.org.ru mailto:freeman
submission.org.ru
>
>
>
attached mail follows:
Tamas Arpad wrote: > > That's not right now. The manual is outdated. See this bug report > http://bugs.php.net/bug.php?id=15209. > This behavior was changed from 4.06 to 4.1. In newer versions of php the > registered functions will run before the connection is closed so ouptput can > be done from there as well. > > So Jean you can make it as it is suggested on this page: > http://www.php.net/manual/en/features.connection-handling.php
Cool! I just tested it out and it works. At lest under PHP 4.3.0 and Apache 1.3.26.
But according to the bug report this functionality may change in the future and a new function apache_register_shutdown() might replace the current one ...
The current functionality is *not* what is documented, but is it was is *intended*. I.e. will the current functionality be change to be what the docs say or will it continue and the docs will be changed?
I will be using this functionality and need to know if it will change in future releases ...
Thanks for this info. It was a great help!
Jc
attached mail follows:
Robert Fisher wrote: > > If you are willing to do a rewrite, then have your > main script start a fork, or child process.
According to Arpi (see below) I can use register_shutdown(), as the docs are wrong and it *will* send output to the browser *before* the connection is closed.
Jc
>Tamas Arpad wrote: > That's not right now. The manual is outdated. See this bug report > http://bugs.php.net/bug.php?id=15209. > This behavior was changed from 4.06 to 4.1. In newer versions of php the > registered functions will run before the connection is closed so ouptput can > be done from there as well. > So Jean you can make it as it is suggested on this page: > http://www.php.net/manual/en/features.connection-handling.php > > Arpi
attached mail follows:
> Cool! I just tested it out and it works. At lest under PHP 4.3.0 and > Apache 1.3.26. > > But according to the bug report this functionality may change in the > future and a new function apache_register_shutdown() might replace the > current one ... > > The current functionality is *not* what is documented, but is it was is > *intended*. I.e. will the current functionality be change to be what the > docs say or will it continue and the docs will be changed? > > I will be using this functionality and need to know if it will change in > future releases ... There was a discussion about this topic on the dev list, and because of many reasons the current functionality of register_shutdown_function() will remain the same in future releases too. Joseph Tate is working on a new function (apache_register_shutdown_function) to make it possible on apache to use the old behavior (Thanks Joseph! :)).
Arpi
attached mail follows:
Tamas Arpad wrote: > > There was a discussion about this topic on the dev list, and because of many > reasons the current functionality of register_shutdown_function() will remain > the same in future releases too. Joseph Tate is working on a new function > (apache_register_shutdown_function) to make it possible on apache to use the > old behavior (Thanks Joseph! :)).
Great! Love you guys! This "buggy" function is coming in quite handy :)
Jc
attached mail follows:
Matt Vos wrote: > > What is the ASCII value of an EOF? Find that and use <? echo > chr($eof_ascii_value); ?>
For the benefit of those reading this in the future the value is 4, so use chr(4);
Jc
attached mail follows:
I wish to integrate a secure HTTP tunnel into an existing PHP application I am working on. I am having a hard time understanding the PHP.net OpenSSL documentation. Any pointers, or refrences would be really helpful. Source is at http://harrisdracon.dyndns.org/phpcode/hw.src
-- Jonathan Lassoff
attached mail follows:
give a idea please. This is correct? <script languaje="JavaScript"> location.href="page.php?<?=SID?>&cliente=$cli"; </script>
Ysrael Guzmán Meza
attached mail follows:
Hmm "language" !!! languaje
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Ysrael Guzmán [mailto:yguzman
layconsa.com.pe]
> Sent: Thursday, 9 January 2003 12:43 PM
> To: php-general
lists.php.net
> Subject: [PHP] problem with location???
>
>
> give a idea please.
>
> This is correct?
>
> <script languaje="JavaScript">
> location.href="page.php?<?=SID?>&cliente=$cli";
> </script>
>
>
>
> Ysrael Guzmán Meza
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Ysrael guzmán wrote: > > This is correct? > > <script languaje="JavaScript"> > location.href="page.php?<?=SID?>&cliente=$cli"; > </script>
You have one small mistake here:
<script language="JavaScript">
And a bigger mistake here:
location.href="page.php?<?php echo SID . "&cliente=$cli"; ?>"
Jc
attached mail follows:
Is it possible to define a different php.ini for each user which use the same server, either Unix and Windows. Let me give you example what I mean:
User 1 (professional PHP-user) Allow him big uploads, long execution time etc. Virtual directory www.user1.com
User 2 (amateur PHP-user) Allow smal uploads, short execution time etc. Virtual directory www.user2.com
Thanks, Sumarlidi E. Dadason
SED - Graphic Design
_________________________________
E-mail: sed
sed.is
website: www.sed.is
attached mail follows:
You can set php_value and php_flags etc inside of the virtual host def in httpd.conf etc
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: SED [mailto:sed
sed.is]
> Sent: Thursday, 9 January 2003 1:10 PM
> To: php-general
lists.php.net
> Subject: [PHP] Different php.ini for each user on same server
>
>
> Is it possible to define a different php.ini for each user
> which use the same server, either Unix and Windows. Let me
> give you example what I
> mean:
>
> User 1 (professional PHP-user)
> Allow him big uploads, long execution time etc.
> Virtual directory www.user1.com
>
> User 2 (amateur PHP-user)
> Allow smal uploads, short execution time etc.
> Virtual directory www.user2.com
>
> Thanks,
> Sumarlidi E. Dadason
>
> SED - Graphic Design
> _________________________________
> E-mail: sed
sed.is
> website: www.sed.is
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Please keep it on list and (reply to all) as it assist everyone then!!
Check out:
http://www.php.net/manual/en/configuration.directives.php
As a starting point!!
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: SED [mailto:sed
sed.is]
> Sent: Thursday, 9 January 2003 1:14 PM
> To: 'Timothy Hitchens (HiTCHO)'
> Subject: RE: [PHP] Different php.ini for each user on same server
>
>
> Thanks, do you know where I can find document about that?
>
>
> Regards,
> Sumarlidi E. Dadason
>
> SED - Graphic Design
> _________________________________
> Tel: 896-0376, 461-5501
> E-mail: sed
sed.is
> website: www.sed.is
>
> -----Original Message-----
> From: Timothy Hitchens (HiTCHO) [mailto:phplists
hitcho.com.au]
> Sent: 9. janúar 2003 03:09
> To: 'SED'; php-general
lists.php.net
> Subject: RE: [PHP] Different php.ini for each user on same server
>
>
> You can set php_value and php_flags etc inside of the virtual
> host def in httpd.conf etc
>
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: tim
hitcho.com.au
>
> > -----Original Message-----
> > From: SED [mailto:sed
sed.is]
> > Sent: Thursday, 9 January 2003 1:10 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] Different php.ini for each user on same server
> >
> >
> > Is it possible to define a different php.ini for each user
> which use
> > the same server, either Unix and Windows. Let me give you
> example what
> > I
> > mean:
> >
> > User 1 (professional PHP-user)
> > Allow him big uploads, long execution time etc.
> > Virtual directory www.user1.com
> >
> > User 2 (amateur PHP-user)
> > Allow smal uploads, short execution time etc.
> > Virtual directory www.user2.com
> >
> > Thanks,
> > Sumarlidi E. Dadason
> >
> > SED - Graphic Design
> > _________________________________
> > E-mail: sed
sed.is
> > website: www.sed.is
> >
> >
> > --
> > 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
>
attached mail follows:
Maybe I'm little bit slow today but I already look into this document. What paragraph should I focus better on? What I'm looking for is *how to* refer to a different php.ini in each case.
Thanks, SED
-----Original Message-----
From: Timothy Hitchens (HiTCHO) [mailto:phplists
hitcho.com.au]
Sent: 9. janúar 2003 03:15
To: 'SED'
Cc: php-general
lists.php.net
Subject: RE: [PHP] Different php.ini for each user on same server
Please keep it on list and (reply to all) as it assist everyone then!!
Check out:
http://www.php.net/manual/en/configuration.directives.php
As a starting point!!
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: SED [mailto:sed
sed.is]
> Sent: Thursday, 9 January 2003 1:14 PM
> To: 'Timothy Hitchens (HiTCHO)'
> Subject: RE: [PHP] Different php.ini for each user on same server
>
>
> Thanks, do you know where I can find document about that?
>
>
> Regards,
> Sumarlidi E. Dadason
>
> SED - Graphic Design
> _________________________________
> Tel: 896-0376, 461-5501
> E-mail: sed
sed.is
> website: www.sed.is
>
> -----Original Message-----
> From: Timothy Hitchens (HiTCHO) [mailto:phplists
hitcho.com.au]
> Sent: 9. janúar 2003 03:09
> To: 'SED'; php-general
lists.php.net
> Subject: RE: [PHP] Different php.ini for each user on same server
>
>
> You can set php_value and php_flags etc inside of the virtual
> host def in httpd.conf etc
>
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: tim
hitcho.com.au
>
> > -----Original Message-----
> > From: SED [mailto:sed
sed.is]
> > Sent: Thursday, 9 January 2003 1:10 PM
> > To: php-general
lists.php.net
> > Subject: [PHP] Different php.ini for each user on same server
> >
> >
> > Is it possible to define a different php.ini for each user
> which use
> > the same server, either Unix and Windows. Let me give you
> example what
> > I
> > mean:
> >
> > User 1 (professional PHP-user)
> > Allow him big uploads, long execution time etc.
> > Virtual directory www.user1.com
> >
> > User 2 (amateur PHP-user)
> > Allow smal uploads, short execution time etc.
> > Virtual directory www.user2.com
> >
> > Thanks,
> > Sumarlidi E. Dadason
> >
> > SED - Graphic Design
> > _________________________________
> > E-mail: sed
sed.is
> > website: www.sed.is
> >
> >
> > --
> > 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
>
attached mail follows:
What you need to do is have a base php.ini and in each virtual you have the specific eg:
# your vitual host
<VirtualHost xxx.xxx.xxx.xxx>
DocumentRoot /www/docroot/first/
ServerName dummy.yourdomain.com
php_admin_value disable_functions 'mysql_connect'
php_admin_value sendmail_path '/usr/sbin/sendmail -f
spammer
yourdomain.com -t -i'
</VirtualHost>
The you can add the file upload size flag and value just like that.
Please note some flags and values can be added here and some to the .htaccess files with some restricted for security purposes such as base open etc!!
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: SED [mailto:sed
sed.is]
> Sent: Thursday, 9 January 2003 1:27 PM
> To: 'Timothy Hitchens (HiTCHO)'; php-general
lists.php.net
> Subject: RE: [PHP] Different php.ini for each user on same server
>
>
> Maybe I'm little bit slow today but I already look into this
> document. What paragraph should I focus better on? What I'm
> looking for is *how
> to* refer to a different php.ini in each case.
>
> Thanks,
> SED
>
> -----Original Message-----
> From: Timothy Hitchens (HiTCHO) [mailto:phplists
hitcho.com.au]
> Sent: 9. janúar 2003 03:15
> To: 'SED'
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] Different php.ini for each user on same server
>
>
> Please keep it on list and (reply to all) as it assist everyone then!!
>
> Check out:
>
> http://www.php.net/manual/en/configuration.directives.php
>
> As a starting point!!
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: tim
hitcho.com.au
>
> > -----Original Message-----
> > From: SED [mailto:sed
sed.is]
> > Sent: Thursday, 9 January 2003 1:14 PM
> > To: 'Timothy Hitchens (HiTCHO)'
> > Subject: RE: [PHP] Different php.ini for each user on same server
> >
> >
> > Thanks, do you know where I can find document about that?
> >
> >
> > Regards,
> > Sumarlidi E. Dadason
> >
> > SED - Graphic Design
> > _________________________________
> > Tel: 896-0376, 461-5501
> > E-mail: sed
sed.is
> > website: www.sed.is
> >
> > -----Original Message-----
> > From: Timothy Hitchens (HiTCHO) [mailto:phplists
hitcho.com.au]
> > Sent: 9. janúar 2003 03:09
> > To: 'SED'; php-general
lists.php.net
> > Subject: RE: [PHP] Different php.ini for each user on same server
> >
> >
> > You can set php_value and php_flags etc inside of the
> virtual host def
> > in httpd.conf etc
> >
> >
> >
> > Timothy Hitchens (HiTCHO)
> > Open Platform Consulting
> > e-mail: tim
hitcho.com.au
> >
> > > -----Original Message-----
> > > From: SED [mailto:sed
sed.is]
> > > Sent: Thursday, 9 January 2003 1:10 PM
> > > To: php-general
lists.php.net
> > > Subject: [PHP] Different php.ini for each user on same server
> > >
> > >
> > > Is it possible to define a different php.ini for each user
> > which use
> > > the same server, either Unix and Windows. Let me give you
> > example what
> > > I
> > > mean:
> > >
> > > User 1 (professional PHP-user)
> > > Allow him big uploads, long execution time etc.
> > > Virtual directory www.user1.com
> > >
> > > User 2 (amateur PHP-user)
> > > Allow smal uploads, short execution time etc.
> > > Virtual directory www.user2.com
> > >
> > > Thanks,
> > > Sumarlidi E. Dadason
> > >
> > > SED - Graphic Design
> > > _________________________________
> > > E-mail: sed
sed.is
> > > website: www.sed.is
> > >
> > >
> > > --
> > > 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
> >
>
attached mail follows:
Greetings,
I'm having a weird issue with float precision. I am decrementing the value of a float by 0.1. The problem is when the float I am working with reaches 0.1 and I decrement it again I get 1.e09 instead of the expected 0.0. This was also confirmed by a user in #php. Anyone have any ideas?
Thanks.
attached mail follows:
On Thursday 09 January 2003 12:33, Kevin Avila wrote: > Greetings, > > I'm having a weird issue with float precision. I am decrementing the > value of a float by 0.1. The problem is when the float I am working > with reaches 0.1 and I decrement it again I get 1.e09 instead of the > expected 0.0. This was also confirmed by a user in #php. Anyone have > any ideas?
Use the BCMath functions if you require absolute precision.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* If you knew what to say next, would you say it? */
attached mail follows:
I am going to be dealing with a ton of data shortly and my goal is to make it accessible via the web. I am curious about the performance differences between using a database or leaving the data in the individual files they originated in. Can anyone offer any recommendations?
attached mail follows:
Erich Kolb wrote: > > I am going to be dealing with a ton of data shortly and my goal is to make > it accessible via the web. I am curious about the performance differences > between using a database or leaving the data in the individual files they > originated in. Can anyone offer any recommendations?
Depends on what you mean by "a ton of data" and what kind of work you will do with the data.
If all you will do is display the file as is on the web, then leave in file format.
If the data needs to be searched, parsed, or indexed, the use a DB.
My 2 cents,
Jc
attached mail follows:
My 2 cents would be use a database and templates then create cached static versions of the pages on the first request and then when you need to changes things it is just a simple change the template and you a whole new look without the issue of performance.
Make that 5 cents worth!!
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Jean-Christian Imbeault [mailto:jc
mega-bucks.co.jp]
> Sent: Thursday, 9 January 2003 3:54 PM
> To: php-general
lists.php.net
> Subject: [PHP] Re: Databases vs. File Access
>
>
> Erich Kolb wrote:
> >
> > I am going to be dealing with a ton of data shortly and my
> goal is to
> > make it accessible via the web. I am curious about the performance
> > differences between using a database or leaving the data in the
> > individual files they originated in. Can anyone offer any
> > recommendations?
>
> Depends on what you mean by "a ton of data" and what kind of work you
> will do with the data.
>
> If all you will do is display the file as is on the web, then
> leave in
> file format.
>
> If the data needs to be searched, parsed, or indexed, the use a DB.
>
> My 2 cents,
>
> Jc
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Hi there,
I have written a class that manages sessions. I have never used sessions before so all this is new to me. Everything works fine as far as starting the session and logging in however when I call sessoin destroy it doesn't seem to work the function returns 1 as it should if all goes well however if I go to another page and do some other browsing even if I close the browser the session still hangs around. Is there something I don't know about sessions? I have read the documentation on the session_destroy function, I don't think that I am missing anything...
Anyone have any suggestions? I am totally confused.
Thanks Ken
attached mail follows:
In my code, I usually dump session data before calling session_destroy() like -> $_SESSION = array(); // Now its empty session_destroy(); // Then call session destroy.
Works for me.
Ken Nagorski wrote:
>Hi there, > >I have written a class that manages sessions. I have never used sessions >before so all this is new to me. Everything works fine as far as starting >the session and logging in however when I call sessoin destroy it doesn't >seem to work the function returns 1 as it should if all goes well however if >I go to another page and do some other browsing even if I close the browser >the session still hangs around. Is there something I don't know about >sessions? I have read the documentation on the session_destroy function, I >don't think that I am missing anything... > >Anyone have any suggestions? I am totally confused. > >Thanks >Ken > > > > > >
-- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/
attached mail follows:
Hello;
I'm getting a segmentation fault and I don't understand what it means. Kind of new to php debugging.
Background: Web server is generally error free. I have some complex php/MySQL applications installed. I'm running it under YellowDogLinux with php v4.23.
I'm trying to install a CVS version of the Horde project. I'm having a problem with horde in that it doesn't save configuration values like it should. The Horde developers recommended that I do some debugging by placing a var_dump($_POST) call at a strategic place in the script. However, when I try to run the script with that call active, the web browser responds back: "Connection closed by server". Checking the apache error log shows the following:
[Wed Jan 8 21:36:38 2003] [notice] child pid 5261 exit signal Segmentation fault (11)
What is wrong? It only does this when the var_dump() is present; comment it out and there is no segmentation fault (but the script still doesn't work right). With it present, the seg faults every time.
TIA
Rob
attached mail follows:
On Thursday 09 January 2003 05:59, Rob Brandt wrote:
> What is wrong? It only does this when the var_dump() is present; > comment it out and there is no segmentation fault (but the script > still doesn't work right). With it present, the seg faults every > time.
You can try using print_r() instead of var_dump(). It's output is not as detailed as var_dump() but may be sufficient for your needs.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* Everything should be built top-down, except this time. */
attached mail follows:
G'day all
I have a web page were users can upload and downloads files. When they go to download a file A list of files they can download is displayed and a check box next to each file name and a button, with which the users can click to download the selected file.
What I would like to know what would be the best method of doing this? Would it be best to imbed the whole thing in a form, or is there another way that php can get the file information from the check box.
The code I am working on is below, I am not very effient and a newbie at php so please excuse the mess
Thanks Heaps cj
//This gets the information of the owner and location of the file from the db $result = mysql_query("SELECT * FROM binary_files WHERE owner='$owner' and location='$location'", $db);
//this displays a table with Name, Size, and info. echo "<tr><td></td><td>Name</td><td>Size</td><td>Info</td></tr>\n"; $myfile="0";
//This fetchs the file information from the above mysql_query while ($myrow = mysql_fetch_array($result, MYSQL_ASSOC)) {
//this displays a table with a checkbox, I would like the file_id to be the value for the checkbox (not //working) the check box gets no value echo "<tr><td><input TYPE=checkbox NAME=filetodownload VALUE=$myrow[id_files] UNCHECKED></td>"; echo "<br>"; echo "File To Download: "; echo $filetodownload; echo "<br>";
//This displays a link to the file download.php with the url varieble filedownload which equels the file_id obtained from the db echo "<td><a href=download.php?filedownload=$myrow[id_files]>$myrow[filename]</a></td>";
//This displays the filesize echo "<td>$myrow[filesize]</td>";
//this display a info link (not yet implemented echo "<td><a href=info.php?fileinfo=$myrow[id_files]><img src=/Images/Info.png hspace=0 vspace=0 border= 0></a></td>"; echo "
//This displays a image, with a link to download.php with the url variable filedownload which contains the //file_id from the check box above (not working) <a href=/upload/download.php?filedownload=$filetodownload target=main><img src=/Images/icons.php?text=Download&color=red border=0 border=0></a> ";
}
echo "</table>\n";
attached mail follows:
Is anyone out there using the new aggregation functions on objects?
Greg
-- phpDocumentor http://www.phpdoc.org
attached mail follows:
if ($isValid) { $cgi = '/cgi-bin'; if (strpos($HTTP_HOST, 'dyndns') === false) $cgi .= '/cgiwrap/ppowell'; $fileID = fopen("http://$SERVER_NAME$cgi/pollinsert.cgi?pollID=$pollID&answerID=$answerID&valIdentifier=" . urlencode($valIdentifier) . "&lastPollResultsID=" . ($pollResultsArray[sizeOf($pollResultsArray) - 2][attributes][ID] + 1), 'r') or die('Could not open CGI'); $result = fread($fileID, 100000); fclose($fileID); if (trim(strtoupper($result)) != 'DONE') die ("Problem with TCL CGI writing to file: $result"); // RE-PARSE XML CONTENTS SINCE ADDING NEW POLL ANSWER unset($pollResultsArray); unset($pollResultsXMLStuff); $fileID = fopen('/users/ppowell/web/xml/pollresults.xml', 'r') or die('Could not reopen file'); $pollResultsXMLStuff = fread($fileID, filesize('/users/ppowell/web/xml/pollresults.xml')); fclose($fileID); $parser = xml_parser_create(); xml_parse_into_struct($parser, $pollResultsXMLStuff, $pollResultsArray, $tags); xml_parser_free($parser); } else { // REDIRECT BACK TO POLL IF header("Location: http://$SERVER_NAME/poll/poll.php?pollID=$pollID&errorMsg=" . urlencode($errorMsg)); } // END OF FORM PLACEMENT
}
I am making changes to an XML file (and the only way I can, unless anyone knows how in PHP I can write TO an XML file!!! is to use a TCL CGI script to write to the XML file), once changes have been made I need to reopen the file and read its contents, however, every time I do I am getting OLD file information and NOT my changes, every single time, unless I refresh my page...
Does anyone know what I can do about this? I can't redirect them, that would be horribly inefficient.. what can I do?
Thanx Phil
attached mail follows:
Hi,
I was wondering if there is a php extension available that allows me to do the following -
1. Connect to a given IP address and port 2. Allow me to send and receive data from a particular ip and port 3. Pool the connections so that further requests to the given ip and port will reuse the existing connection
Tx, Vinod.
-----------------------------------
Vinod Panicker <vinod
geodesiconline.com>
Sr. Software Designer
Geodesic Information Systems Ltd.
attached mail follows:
PHP supports sockets check out:
http://www.php.net/manual/en/ref.sockets.php
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Vinod Panicker [mailto:vinod
geodesiconline.com]
> Sent: Thursday, 9 January 2003 5:31 PM
> To: php-general
lists.php.net
> Subject: [PHP] Connection pool extension?
>
>
> Hi,
>
> I was wondering if there is a php extension available that
> allows me to do the following -
>
> 1. Connect to a given IP address and port
> 2. Allow me to send and receive data from a particular ip and port
> 3. Pool the connections so that further requests to the given ip
> and port will reuse the existing connection
>
> Tx,
> Vinod.
>
> -----------------------------------
> Vinod Panicker <vinod
geodesiconline.com>
> Sr. Software Designer
> Geodesic Information Systems Ltd.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Hi,
Thanks for the quick response - I am aware of PHP's support for sockets, but since I cant store persistent connection information in a PHP script I was looking out for a module
Tx, Vinod.
-----------------------------------
Vinod Panicker <vinod
geodesiconline.com>
Sr. Software Designer
Geodesic Information Systems Ltd.
-----Original Message-----
From: Timothy Hitchens (HiTCHO) [mailto:phplists
hitcho.com.au]
Sent: Thursday, January 09, 2003 1:00 PM
To: 'Vinod Panicker'; php-general
lists.php.net
Subject: RE: [PHP] Connection pool extension?
PHP supports sockets check out:
http://www.php.net/manual/en/ref.sockets.php
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Vinod Panicker [mailto:vinod
geodesiconline.com]
> Sent: Thursday, 9 January 2003 5:31 PM
> To: php-general
lists.php.net
> Subject: [PHP] Connection pool extension?
>
>
> Hi,
>
> I was wondering if there is a php extension available that
> allows me to do the following -
>
> 1. Connect to a given IP address and port
> 2. Allow me to send and receive data from a particular ip and port
> 3. Pool the connections so that further requests to the given ip
> and port will reuse the existing connection
>
> Tx,
> Vinod.
>
> -----------------------------------
> Vinod Panicker <vinod
geodesiconline.com>
> Sr. Software Designer
> Geodesic Information Systems Ltd.
>
>
>
> --
> 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
attached mail follows:
Hi!
I have one question. How can I get sorted listing of a direcorty with readdir function? Is this possible or I have to write custom function using array function sort?
TNX
LP, AlesL
attached mail follows:
On Thursday 09 January 2003 16:29, Ale¹ Lonèar wrote: > Hi! > > I have one question. > How can I get sorted listing of a direcorty with readdir function? Is this > possible
No, not with readdir() on its own.
> or I have to write custom function using array function sort?
Yes, that is what you would have to do. Check out the user notes on the online manual. I think someone has posted some code that you can use or adapt.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* One has to look out for engineers -- they begin with sewing machines and end up with the atomic bomb. -- Marcel Pagnol */
attached mail follows:
I've written a script that uses proc_open() to call and external program and capture it's output.
My script works fine as long as I call/use it in the directory where it resides. But if I try to include() it in a script that resides in another folder proc_open() return an exit value of 255. I can't access the external program.
What am I missing? Some file perms? I did a "chown -R apache *" from the top directory but that didn't help ...
I'm using the php.ini-recommended file. Is there some setting in there I should change?
Jc
attached mail follows:
I'm passing a var into a function which is a 16 digit number, but when I try to print it out I get 1.11111111111E+15 instead of the expected 11111111111111.
Why? How can I change this behaviour?
Jc
attached mail follows:
Hello,
Jean-Christian Imbeault <jc
mega-bucks.co.jp> wrote:
> I'm passing a var into a function which is a 16 digit number, but when I
> try to print it out I get 1.11111111111E+15 instead of the expected
> 11111111111111.
>
> Why?
I guess it's because the number is converted automatically to an exponential notation if it goes over a certain number of digits--makes it easier to read...
> How can I change this behaviour?
Perhaps, you can use sprintf()
http://www.php.net/manual/en/function.sprintf.php
HTH,
- E
__________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
attached mail follows:
- Edwin wrote: > > I guess it's because the number is converted automatically to an exponential notation if it goes over a certain number of digits--makes it easier to read...
I figured as much. But why? I found a solution by changing the precision of floats in the php.ini file.
But I still find it strange that PHP will, internally, happily treat my variable as a string but when it comes time to print it out, it decides that it's a number and formats it without my asking it to.
Jc
attached mail follows:
Jean-Christian Imbeault <jc
mega-bucks.co.jp> wrote:
> - Edwin wrote:
> >
> > I guess it's because the number is converted automatically to an
> > exponential notation if it goes over a certain number of digits--makes
> > it easier to read...
>
> I figured as much. But why? I found a solution by changing the precision
> of floats in the php.ini file.
>
> But I still find it strange that PHP will, internally, happily treat my
> variable as a string but when it comes time to print it out, it decides
> that it's a number and formats it without my asking it to.
Mmm, I'm not sure if I understand this correctly but I don't think PHP will "just decide" that your string IS a number and *formats* it.
Consider this:
<?php
$var = 1111111111111111; // int $var2 = "1111111111111111"; // str echo $var; // echoes 1.11111111111E+015 echo '<br />'; echo $var2; // echoes 1111111111111111
?>
As you can see, PHP didn't "touch" the string version...
Anyway, I don't think the conversion to an exponential notation is peculiar to PHP--my math teacher required me to do the same :)
- E
__________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
attached mail follows:
- Edwin wrote: > [...]
> As you can see, PHP didn't "touch" the string version...
True. My var is being passed in as a POST var so maybe that has something to do with it ...
Jc
attached mail follows:
Hello all,
i am executing grep command from php to get listing of files containing searched phrase.... i am getting output like this:
a/x.txt a/y.txt b/z.txt
I am unable to find any way to replace spaces for \n character using ereg_replace(), I tried to replace / instead and it replaced it in last filepath...so i am wondering..am I getting output in one "line"? Or what?
I was also considering PassThru() but it is not suitable for my needs, because it generates binary data.
Can anyone help me please?
I have RedHat as webserver, so linux environment :) source is here:
<? $search="text" //what are we looking for $where="dir" //which directory of site we are searching in
$com="grep -lr ".$search." ".$where."*"; //setting up command
$output=system($com); //executing command echo ereg_replace(" ", "\n", $output); ?>
-- Best regards, Martin mail corwincorwin.sk mobile +421.907.303.393 icq 34358414 www http://www.corwin.sk
PGP key fingerprint 21365ca05ecfd8aeb1cf19c838fff033
"In those days spirits were brave, the stakes were high, men were real men, women were real women and small furry creatures from Alpha Centauri were real small furry creatures from Alpha Centauri."
by Douglas Adams
attached mail follows:
If this is for output to a web browser you can use nl2br to changed all the line-breaks to <BR>'s ...
Jc
attached mail follows:
"Electroteque" <daniel
electroteque.org> wrote in message
news:20030108210725.59160.qmail
pb1.pair.com...
> hi i am considering the move from fast template to xslt , is there any
> benifits for this ? also is there a way to intergrate xsl like fast
template
> ie parse rows in the php script
In my (biased) opinion, you could be better of staying with templates. But you could try TemplateTamer, to simplify, organize, and improve your template development. I believe that TemplateTamer would be more productive than either FastTemplate or xslt.
rush
-- http://www.templatetamer.org/
attached mail follows:
hi i am just reading up on gettext , it says its for translating messages , how about translating entire site content ? and a question i have been asked is how authentic is the translations ?
attached mail follows:
Hello,
"electroteque" <daniel
electroteque.org> wrote:
> hi i am just reading up on gettext , it says its for translating messages
> , how about translating entire site content ?
Mmm, I don't think anything like that exists--at least, not yet. There are or no sites (or software) that can perfectly translate any entire site. And, don't expect anything that would translate your entire encyclopaedia automatically as well... :)
> and a question i have been > asked is how authentic is the translations ?
Well, for gettext's translations, I believe the translators are real humans (and they're native speakers) so you can expect a high quality translation that serves its purpose...
Just MHO,
- E
__________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
attached mail follows:
how does it work then ? i assumed from the description , you give it a locale and it will translate content from the database into the given language ? damn wish there was something like that
-----Original Message-----
From: copperwa11s
yahoo.co.jp [mailto:copperwa11s
yahoo.co.jp]
Sent: Thursday, January 09, 2003 9:11 PM
To: electroteque
Cc: php-general
lists.php.net
Subject: Re: [PHP] gettext and translations
Hello,
"electroteque" <daniel
electroteque.org> wrote:
> hi i am just reading up on gettext , it says its for translating messages
> , how about translating entire site content ?
Mmm, I don't think anything like that exists--at least, not yet. There are or no sites (or software) that can perfectly translate any entire site. And, don't expect anything that would translate your entire encyclopaedia automatically as well... :)
> and a question i have been > asked is how authentic is the translations ?
Well, for gettext's translations, I believe the translators are real humans (and they're native speakers) so you can expect a high quality translation that serves its purpose...
Just MHO,
- E
__________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
attached mail follows:
have a look at this guys
i'm installing it now
-----Original Message-----
From: copperwa11s
yahoo.co.jp [mailto:copperwa11s
yahoo.co.jp]
Sent: Thursday, January 09, 2003 9:11 PM
To: electroteque
Cc: php-general
lists.php.net
Subject: Re: [PHP] gettext and translations
Hello,
"electroteque" <daniel
electroteque.org> wrote:
> hi i am just reading up on gettext , it says its for translating messages
> , how about translating entire site content ?
Mmm, I don't think anything like that exists--at least, not yet. There are or no sites (or software) that can perfectly translate any entire site. And, don't expect anything that would translate your entire encyclopaedia automatically as well... :)
> and a question i have been > asked is how authentic is the translations ?
Well, for gettext's translations, I believe the translators are real humans (and they're native speakers) so you can expect a high quality translation that serves its purpose...
Just MHO,
- E
__________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
attached mail follows:
Hi experts,
Seen this in many mailing list, but I do not know the logic behind it, hope someone can spare some time to enlighten me.
Recall that many mailing list systems all users to send an email with the word "unsubscribe" (or "help" or "subscribe" for that matter.) in the subject line to allow the subscriber to unsubscribe, therefore I believe that there is a way to make the mail server, or which ever it is, to response specifically to text within the mail.
Besides using this for mailing list, I think the logic can also be used I other areas such as specific response to Q&A etc.
However, I have no idea how this is accomplished and what this system is called, so I need some precious help here. Anyone please?
Thanks in advance.. =)
Yours faithfully,
See Kok Boon
Realize Creations
http://www.RealizeCreations.com
-----------------------------------------------------------------------
looking for jobs? career? chat?
look in realPortal
attached mail follows:
Hello,
"See kok Boon" <kokboon
shinningstudios.com> wrote:
> Hi experts,
Well, I'm no expert ;) so let me just tell you where you can find more info.
I think you're looking for something like what PHP's mailing list is using. It's called ezmlm. Pls. check their site:
- E
...[snip]...
__________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
attached mail follows:
I'm not sure how it's done exactly but I think the basic concept is to have a daemon running, or have your program run by cron, and have the program collect it's mail.
On Linux I think you can get your mail simply by fetching and parsing the file /var/spool/mail/"username", where username is the name of the account unsubscribe requests are mailed to.
But you want a mailing list, use major domo or some other ML spftware instead of writing your own.
Jc
attached mail follows:
On Thursday 09 January 2003 17:33, See kok Boon wrote:
> Seen this in many mailing list, but I do not know the logic behind it, hope > someone can spare some time to enlighten me. > > > > Recall that many mailing list systems all users to send an email with the > word "unsubscribe" (or "help" or "subscribe" for that matter.) in the > subject line to allow the subscriber to unsubscribe, therefore I believe > that there is a way to make the mail server, or which ever it is, to > response specifically to text within the mail. > > > > Besides using this for mailing list, I think the logic can also be used I > other areas such as specific response to Q&A etc. > > > > However, I have no idea how this is accomplished and what this system is > called, so I need some precious help here. Anyone please?
Most MTA systems can process mail through an arbitary program. Thus you can use a CLI version of PHP to process your mail. Search the archives for "process email".
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* Do not underestimate the power of the Force. */
attached mail follows:
To: Jason Wong
Hi,
Sorry, I am abit dumb. Where is the archive that you refer to in your email?
-----Original Message-----
From: Jason Wong [mailto:php-general
gremlins.biz]
Sent: 09 January 2003 06:10
To: php-general
lists.php.net
Subject: Re: [PHP] how to make server response to emails
On Thursday 09 January 2003 17:33, See kok Boon wrote:
> Seen this in many mailing list, but I do not know the logic behind it, hope > someone can spare some time to enlighten me. > > > > Recall that many mailing list systems all users to send an email with the > word "unsubscribe" (or "help" or "subscribe" for that matter.) in the > subject line to allow the subscriber to unsubscribe, therefore I believe > that there is a way to make the mail server, or which ever it is, to > response specifically to text within the mail. > > > > Besides using this for mailing list, I think the logic can also be used I > other areas such as specific response to Q&A etc. > > > > However, I have no idea how this is accomplished and what this system is > called, so I need some precious help here. Anyone please?
Most MTA systems can process mail through an arbitary program. Thus you can use a CLI version of PHP to process your mail. Search the archives for "process email".
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* Do not underestimate the power of the Force. */
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
To: copperwa11s
yahoo.co.jp
Hi,
Erm.. actually I am not looking for a mailing list program, instead I am looking for a program (preferably written in PHP) that would allow me to capture emails containing specific text in its content and return specific results according to the email content...
Any more clues for me?
-----Original Message-----
From: copperwa11s
yahoo.co.jp [mailto:copperwa11s
yahoo.co.jp]
Sent: 09 January 2003 06:02
To: See kok Boon
Cc: php-general
lists.php.net
Subject: Re: [PHP] how to make server response to emails
Hello,
"See kok Boon" <kokboon
shinningstudios.com> wrote:
> Hi experts,
Well, I'm no expert ;) so let me just tell you where you can find more info.
I think you're looking for something like what PHP's mailing list is using. It's called ezmlm. Pls. check their site:
- E
...[snip]...
__________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Thursday 09 January 2003 18:46, See kok Boon wrote: > To: Jason Wong > > Hi, > > Sorry, I am abit dumb. Where is the archive that you refer to in your > email?
google > "php archive"
Click on the link for MARC.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* If you find a solution and become attached to it, the solution may become your next problem. */
attached mail follows:
See Kok Boon wrote: > > Sorry, I am abit dumb. Where is the archive that you refer to in your email?
The PHP archives. Go to the PHP web site and follow the links to the mailing lists page. There you will find links to the archives.
Jc
attached mail follows:
This would be a nice thing to include in PECL (see http://pear.php.net).
--Wez.
On Wed, 8 Jan 2003, Nikolai Vladychevski wrote:
> Hello, > > I want to share the code (php-extension) I have included into php-4.2.2 to > support CDK widgets > (http://gd.tuwien.ac.at/hci/cdk/?file=cdk.tar.gz&type=listing) to enable PHP > to use text based "GUI" in terminal environment. > > CDK supports: > -Alphalist (list with alphanumeric search) > -Calendar dialog box > -Dialog > -Entry field with type masking > -Scale field > -2 dimension graphics (text mode) > -Histogram display > -Item list field > -Label > -Marque (text box in movement) > -Matrix field > -Menu > -Scroll > -Selection field > -Slider field > -Radio button > -Template field
attached mail follows:
Hi,
I already tried the php-install list, but nobody has been able to solve my wee problem, I was hoping someone could help me with this. I am trying to install php version 4.3.0 on a sun sparc running solaris 2.8, and I'm getting stuck at the configure step. When running the configure command, this is what I get:
root
dalwhinnie> ./configure
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for working sed... sed
checking host system type... sparc-sun-solaris2.8
And it gets no further. I have no problems configuring php in the past.
Has anyone else seen this?
Thanks in advance,
Ewan
attached mail follows:
Incase anyone is interested, I fixed my problem.
For some reason, the version of shtool that came with php-4.3.0 was not working for me, so I used the one that came with php-4.2.3 - problem solved
Ewan
> Hi,
>
> I already tried the php-install list, but nobody has been able to solve my wee problem, I was
> hoping someone could help me with this. I am trying to install php version 4.3.0 on a sun sparc
> running solaris 2.8, and I'm getting stuck at the configure step. When running the configure
> command, this is what I get:
>
> root
dalwhinnie> ./configure
> loading cache ./config.cache
> checking for Cygwin environment... no
> checking for mingw32 environment... no
> checking for working sed... sed
> checking host system type... sparc-sun-solaris2.8
>
> And it gets no further. I have no problems configuring php in the past.
>
> Has anyone else seen this?
>
> Thanks in advance,
>
> Ewan
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Teo, You may want something like this:
switch( $Color ) { case "Yellow": header("Location: yellow.php"); break; case "Green": header("Location: green.php"); break; default: echo"No switch value present for Color - contact the webmaster."; exit; } // end switch( $Color )
Depending on usage, you may also get away with a simple: include_once("yellow.php"); // instead of using header()
Regards, Richard http://phpyellow.com ______________________ Teo wrote: Hi All! I would like to redirect the user to another php page accordingly to his/her chosen options, example: if ($Color == "Yellow") { go to page .... else if ($Color == "Green") go to page .... }
Does anyone knows how to achieve the goal??
Thanks
Teo
attached mail follows:
Hi there,
can someone please explain what __CLASS__ and __FUNCTION__ are and what they do? They are listed in the PHP 4.3.0 changelog and can be found here: http://www.php.net/manual/en/reserved.php but i can't find any explanation.
Michael
attached mail follows:
They return the current class name or the current function in which they are called.
-- Regards. M.CHAILLAN Nicolas nicosphp.net www.WorldAKT.com Hébergement de sites internets.
"Michael Virnstein" <michael.virnstein
brodos.de> a écrit dans le message de news: 20030109103235.94806.qmail
pb1.pair.com... > Hi there, > > can someone please explain what __CLASS__ and __FUNCTION__ are and what they > do? > They are listed in the PHP 4.3.0 changelog and can be found here: > http://www.php.net/manual/en/reserved.php > but i can't find any explanation. > > Michael > >
attached mail follows:
Hi all,
I'm busy making a swebstore. I have troubles with the format of money.
I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"
Whatever I try I can't get the comma there (it's showing a point "." and it doesn't display the second number behind the comma i.e. "12.5"
Anybody knows how to make me my money? :-)
regards Wilbert
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
info
pdd.nl
-------------------------
attached mail follows:
number_format()
http://www.php.net/manual/en/function.number-format.php
=====================
Richard Black
Senior Developer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 951 3481
Email: rblack
datavisibility.co.uk
"Wilbert
Enserink" To: <php-general
lists.php.net>
<wilbert
pdd.n cc:
l> Subject: [PHP] money
09/01/2003
10:44
Hi all,
I'm busy making a swebstore. I have troubles with the format of money.
I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"
Whatever I try I can't get the comma there (it's showing a point "." and it doesn't display the second number behind the comma i.e. "12.5"
Anybody knows how to make me my money? :-)
regards Wilbert
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
info
pdd.nl
-------------------------
________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________
attached mail follows:
http://www.php.net/manual/en/function.number-format.php
----- Original Message -----
From: "Wilbert Enserink" <wilbert
pdd.nl>
To: <php-general
lists.php.net>
Sent: Thursday, January 09, 2003 10:44 AM
Subject: [PHP] money
Hi all,
I'm busy making a swebstore. I have troubles with the format of money.
I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"
Whatever I try I can't get the comma there (it's showing a point "." and it doesn't display the second number behind the comma i.e. "12.5"
Anybody knows how to make me my money? :-)
regards Wilbert
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
info
pdd.nl
-------------------------
attached mail follows:
Wilbert Enserink wrote: > > I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50" > > Whatever I try I can't get the comma there (it's showing a point "." and it doesn't display the second number behind the comma i.e. "12.5"
Show us some code and maybe we can help. If you don't give any code we have no idea what you are doing wrong.
Jc
attached mail follows:
Hi There.
Try this
//To get a comma rather that a period:
$fTotalPrice = $iQuantity * $fUnitPrice; $fTotalPrice = str_replace( '.', ',', $fTotalPrice );
//To check wether to add a zero to the end of a float:
// Get part of float after comma. $iDecimal = substr( $fTotalPrice, strpos( $fTotalPrice, ',' ) +1 ); if ( strlen( $iDecimal ) == 1 ) { $fTotalPrice .= '0'; }
I haven't tested this, but it should work.
Cheers
Scott
On 2003/01/09 12:44, Wilbert Enserink wrote:
> Hi all,
>
>
>
> I'm busy making a swebstore. I have troubles with the format of money.
>
> I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"
>
>
> Whatever I try I can't get the comma there (it's showing a point "." and it doesn't display the second number behind the comma i.e. "12.5"
>
> Anybody knows how to make me my money? :-)
>
> regards Wilbert
>
>
>
>
> -------------------------
> Pas de Deux
> Van Mierisstraat 25
> 2526 NM Den Haag
> tel 070 4450855
> fax 070 4450852
> http://www.pdd.nl
> info
pdd.nl
> -------------------------
-- Scott Houseman Senior Software Developer Junk Mail Publishing (Pty) Ltd T + 27 12 342 3840 ext 2806 F +27 12 342 3876 E scottjunkmail.co.za | www.junkmail.co.za A 1312 Pretorius Street, Hatfield, Pretoria P O Box 6574, Pretoria, 0001, South Africa +27 82 491 8021
attached mail follows:
Hi All
thx for all replies about how to make money. The trick http://www.php.net/manual/en/function.number-format.php did it for me!
regards Wilbert
----- Original Message -----
From: "Danny Shepherd" <danny
kyboshed.com>
To: "Wilbert Enserink" <wilbert
pdd.nl>; <php-general
lists.php.net>
Sent: Thursday, January 09, 2003 11:48 AM
Subject: Re: [PHP] money
> http://www.php.net/manual/en/function.number-format.php
>
> ----- Original Message -----
> From: "Wilbert Enserink" <wilbert
pdd.nl>
> To: <php-general
lists.php.net>
> Sent: Thursday, January 09, 2003 10:44 AM
> Subject: [PHP] money
>
>
> Hi all,
>
>
>
> I'm busy making a swebstore. I have troubles with the format of money.
>
> I wanrt to display amounts like "2 products a ? 6,25 = ? 12,50"
>
>
> Whatever I try I can't get the comma there (it's showing a point "." and
it
> doesn't display the second number behind the comma i.e. "12.5"
>
> Anybody knows how to make me my money? :-)
>
> regards Wilbert
>
>
>
>
> -------------------------
> Pas de Deux
> Van Mierisstraat 25
> 2526 NM Den Haag
> tel 070 4450855
> fax 070 4450852
> http://www.pdd.nl
> info
pdd.nl
> -------------------------
-------------------------
Pas de Deux
Van Mierisstraat 25
2526 NM Den Haag
tel 070 4450855
fax 070 4450852
http://www.pdd.nl
info
pdd.nl
-------------------------
attached mail follows:
Dear Sir/Madam,
I've been trying out my script, it works fine so far on my pc with apache 1.3.26 with php 4.3.0
but when i uploaded to another server with http://www.mercstudio.com/test.php
the session seems to be unstable. sometimes it works, sometimes not.
http://www.mercstudio.com/hoteldemo/myadmin/
when i set the session key called "userkey" it works fine on my pc. but when i upload them on the server, some pc r able to login, but most of the pc did not get to login.
the login check with mysql database went fine, but the session did not set on some pc attempting to login
index.php -> login.php (set userkey=1) -> main.php (check session userkey > 0)
if session userkey is not set, the user will be brought back to index.php
here's my login code:
==============login.php================== include "lib/mysql.php"; include "lib/u007lib.php";
// connecting to mysql db , my own lib... $rs = getdb(""); $rs->query("select * from ct_user where companyid like '" . $HTTP_POST_VARS["companyid"] . "'"); $rs2 = getdb("");
$erron = "";
if(!$rs->eof) {
// if company records found... $rs2->query("select * from ct_login where loginid like '" . $HTTP_POST_VARS["loginid"] . "' and userid=" . $rs->fields("id") . " and pass like '" . $HTTP_POST_VARS["password"] . "'");
if(!$rs2->eof) { // if loginid and password match...
session_start(); // session key to be checked... $userkey = $rs2->fields("lvl");
$userid = $rs2->fields("id"); $userloginid = $rs2->fields("loginid");
$usercomid = $rs->fields("id"); $usercompany = $rs->fields("company"); $usercompanyid = $rs->fields("companyid");
// registering session key session_register("userkey"); session_register("usercomid"); session_register("usercompany"); session_register("usercompanyid");
session_register("userid"); session_register("userloginid");
setcookie("companyid", $HTTP_POST_VARS["companyid"], time()+(60*60*24*30)); setcookie("loginid", $HTTP_POST_VARS["loginid"], time()+(60*60*24*30));
//redirecting to main.php header("location: main.php"); exit(); } else { $erron = "Invalid User / Password"; }
} else { $erron = "No Such Company ID"; }
?> =============end of login code========================
=============beginning code of main.php================= <? session_start(); include "lib/u007lib.php"; include "lib/mysql.php";
// check session userkey if($HTTP_SESSION_VARS["userkey"]-0 < 1) { header("location: ./"); return; } ?> ==============end of main.php code=====================
please advise,
thank you
-- James Tan IT Technical SpecialistNextMove Technology Sdn. Bhd. Tel: 03-5192 1366 Fax: 03-5192 1280 Lot 2-2, Jalan SU6A, Persiaran Tengku Ampuan, Lion Industrial Park, Section 22, 40000 Shah Alam, Selangor D.E.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]