Re: [PHP] Re: Need help to understand a code

2012-09-22 Thread Matijn Woudt
Op 22 sep. 2012 13:47 schreef "Ashley Sheridan" 
het volgende:
>
> On Sat, 2012-09-22 at 17:43 +0600, Ashickur Rahman Noor wrote:
>
> > Hi Ashley
> >
> > I am updating some one code. Thanks for the notify.
> >
> > Thanks to all. Now I get that.
> > --
> > Dedicated Linux Forum in Bangladesh 
> > 2048R/89C932E1 
> > Coordinator - Public Relation Cell, FOSS Bangladesh
> >  && Mozilla
> > Reps 
> > 01199151550, 01551151550
>
>
> It's probably fine doing that for your example, as the content coming
> from the database will be content you expect, but be wary of using it on
> any of the user-generated arrays like $_GET, or $_POST.
>

And a few months/years later you decide to add a new column to your db
which has the same name as one of the variables you're already using and
the script starts acting very strange...
People should stop using bad coding habits like these..

- Matijn


Re: [PHP] Re: Need help to understand a code

2012-09-22 Thread Ashley Sheridan
On Sat, 2012-09-22 at 17:43 +0600, Ashickur Rahman Noor wrote:

> Hi Ashley
> 
> I am updating some one code. Thanks for the notify.
> 
> Thanks to all. Now I get that.
> --
> Dedicated Linux Forum in Bangladesh 
> 2048R/89C932E1 
> Coordinator - Public Relation Cell, FOSS Bangladesh
>  && Mozilla
> Reps 
> 01199151550, 01551151550


It's probably fine doing that for your example, as the content coming
from the database will be content you expect, but be wary of using it on
any of the user-generated arrays like $_GET, or $_POST.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Re: Need help to understand a code

2012-09-22 Thread Ashickur Rahman Noor
Hi Ashley

I am updating some one code. Thanks for the notify.

Thanks to all. Now I get that.
--
Dedicated Linux Forum in Bangladesh 
2048R/89C932E1 
Coordinator - Public Relation Cell, FOSS Bangladesh
 && Mozilla
Reps 
01199151550, 01551151550


Re: [PHP] Re: Need help to understand a code

2012-09-22 Thread Ashley Sheridan
On Sat, 2012-09-22 at 13:13 +0200, Maciek Sokolewicz wrote:

> On 22-09-2012 12:34, Ashickur Rahman Noor wrote:
> > Hi all
> >
> > I need some help to understand a code. The code is like this
> >
> > $result = mysql_query($sSQL) or die("err: " . mysql_error().$sSQL);
> >>  if($row = mysql_fetch_array($result))
> >>  {
> >>foreach($row as $key =>$value){ $$key=$value;}
> >>  }
> >>
> >
> > I don't get the code from the foreach loop.
> It simply assigns all values from the array to variables, which have the 
> name of the keys.
> 
> So basically what happens is:
> $array = array('a'=>1, 'b'=>2, 'c'=>3);
> foreach($array as $key=>$val) {
> $$key = $val;
> }
> 
> will result in the creation of:
> $a = 1;
> $b = 2;
> $c = 3;
> 
> $$foo means "I want a variable whose name is contained in the variable 
> $foo". So if $foo has the value 'bar', then you'll actually be saying "I 
> want a variable whose name is 'bar': $bar".
> 
> So:
> $foo = 'bar';
> $bar = 'this works!';
> 
> echo $$foo; // returns "this works!"
> 
> 
> 


Be careful with this though. I'm working on fixing some old code that
someone wrote. They used this technique to "update" their code when it
got moved to a server where register_globals was turned off.
-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Re: need help finding parsing error please

2005-08-05 Thread Matthew Weier O'Phinney
* Jochem Maas <[EMAIL PROTECTED]> :
> Matthew Weier O'Phinney wrote:
> > * Bruce Gilbert <[EMAIL PROTECTED]> :
> > >
> > > I am getting this on the following code, and I am not sure what is
> > > causing the error and need some pros to take a look at it for me.
> > >
> > > the error is:
> > >
> > > Parse error: parse error, unexpected '{' in
> > > /hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form2.php on
> > > line 161
>
> the error is correct. (that sounds funny)
>
> find the line containing:
>
> if (isset($err_msg) || isset($email_err) { echo
>
> and look _very_ _very_ carefully at it. look again.
> see it now?
>
> I don't know if my mail client made a mess of your code layout
> or if it was just a mess - if it was a mess to begin with then
> I would recommend you try and be more consistent in the way you
> present your code - it makes it easier to maintain and debug - granted
> php doesn't care about the layout - you can write everything on a single line
> if you really want. google on Coding Standards - pick a style your eyes like
> and try to stick with it - you wont regret it.

+1 

I personally use PEAR's CS, and made that decision a little over a year
ago. I've never looked back, and code I've had to maintain that predates
that decision gets updated -- simply because it makes maintenance and
debugging a thousandfold easier.

> > 
> > 
> > > if ($_POST['op']!='ds') { 
> > >// they need to see the form
> > >echo "$form_block";
> > >} else if ($_POST["op"]  == "ds")  {
> > 
> > 
> > Where's the end to this elseif? You follow it immediately with the
> > following lines, which simply won't work (can't define functions inside
> > if() blocks).
>
> Matthew but it's perfectly valid to define a function inside an if()
> block... It generally gets doen in apps where they have to support older 
> versions
> of php and conditionally define functions if they don't exist e.g.
>
> if (!defined("array_push")) {
>   function array_push($arr, $val)  { /*stuff*/ }
> }

D'oh! I was thinking this was an anonymous function (ala perl), and of
course it's not. Good catch, Jochem.

-- 
Matthew Weier O'Phinney
Zend Certified Engineer
http://weierophinney.net/matthew/

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



Re: [PHP] Re: need help finding parsing error please

2005-08-05 Thread Jochem Maas

Matthew Weier O'Phinney wrote:

* Bruce Gilbert <[EMAIL PROTECTED]>:


Hello,

I am getting this on the following code, and I am not sure what is
causing the error and need some pros to take a look at it for me.

the error is:

Parse error: parse error, unexpected '{' in
/hsphere/local/home/bruceg/inspired-evolution.com/Contact_Form2.php on
line 161


the error is correct. (that sounds funny)

find the line containing:

if (isset($err_msg) || isset($email_err) { echo

and look _very_ _very_ carefully at it. look again.
see it now?

I don't know if my mail client made a mess of your code layout
or if it was just a mess - if it was a mess to begin with then
I would recommend you try and be more consistent in the way you
present your code - it makes it easier to maintain and debug - granted
php doesn't care about the layout - you can write everything on a single line
if you really want. google on Coding Standards - pick a style your eyes like
and try to stick with it - you wont regret it.






if ($_POST['op']!='ds') { 
   // they need to see the form

   echo "$form_block";
   } else if ($_POST["op"]  == "ds")  {



Where's the end to this elseif? You follow it immediately with the
following lines, which simply won't work (can't define functions inside
if() blocks).


Matthew but it's perfectly valid to define a function inside an if()
block... It generally gets doen in apps where they have to support older 
versions
of php and conditionally define functions if they don't exist e.g.

if (!defined("array_push")) {
function array_push($arr, $val)  { /*stuff*/ }
}





//Function saves time and space by eliminating unneccesary code
function check($fieldname)
{






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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-18 Thread Mark Rees
"Linda H" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> For those who didn't join this thread at the beginning, I'm running MySQL
> 4.0.21, Apache 2.0.52 and PHP 5.0.2 on a Windows XP system.
>
> I installed in the sequence - MySQL, then Apache, then PHP. MySQL was
> running when the others were installed (which is what the book I am using
> seemed to indicate). Apache was not running when PHP was installed.
>
> >What does php.ini have for this line
> >display_errors = On
>
> Now we are getting somewhere. Even though error_reporting was set to
E_ALL,
> display_errors was Off. I set it On and now I'm getting an error.
>
> Fatal error: Call to undefined function mysql_connect() in C:\Program
> Files\Apache Group\Apache2\htdocs\example\test_connect.php on line 15
>
> the phpinfo() display doesn't reference MySQL at all. It does reference
> SQLite with the following info:
>
> SQLite supportenabled:
> PECL Module version 2.0-dev $Id: sqlite.c,v 1.146.2.2 2004/08/02 22:43:42
> iliaa Exp $
> SQLite Library: 2.8.14
> SQLite Encoding: iso8859
>
> Directive: sqlite_assoc_case, Local Value: 0, Master Value: 0
>
> So it looks like MySQL didn't get configured with PHP.
>
> In the PHP FAQ on database issues, I found the following:
>
> "
> 4. PHP 5 no longer bundles MySQL client libraries, what does this mean to
> me? Can I still use MySQL with PHP? I try to use MySQL and get "function
> undefined" errors, what gives?
>
> Yes. There will always be MySQL support in PHP of one kind or another. The
> only change in PHP 5 is that we are no longer bundling the client library
> itself. Some reasons in no particular order:
> * Most systems these days already have the client library installed.
> * Given the above, having multiple versions of the library can get
> messy. For example, if you link mod_auth_mysql against one version and PHP
> against another, and then enable both in Apache, you get a nice fat crash.
> Also, the bundled library didn't always play well with the installed
server
> version. The most obvious symptom of this being disagreement over where to
> find the mysql.socket Unix domain socket file.
> * Maintenance was somewhat lax and it was falling further and further
> behind the released version.
> * Future versions of the library are under the GPL and thus we don't
> have an upgrade path since we cannot bundle a GPL'ed library in a
> BSD/Apache-style licensed project. A clean break in PHP 5 seemed like the
> best option.
>
> This won't actually affect that many people. Unix users, at least the ones
> who know what they are doing, tend to always build PHP against their
> system's libmyqlclient library simply by adding the --with-mysql=/usr
> option when building PHP. Windows users may enable the extension
> php_mysql.dll inside php.ini. Also, be sure libmysql.dll is available to
> the systems PATH. For more details on how, read the FAQ on
>
setting
> up the Windows systems PATH. Because libmysql.dll (and many other PHP
> related files) exist in the PHP folder, you'll want to add the PHP folder
> to your systems PATH."
>
> I added my PHP folder (C:\php5\) to my system path and restarted
> (libmysql.ddl is in php5). Still get the error. I enabled the extension
> php_mysql.dll in php.ini and Apache startup says it can't find it
> (php_mysql.dll is in C:\php5\ext).

Make sure this is set as follows in php.ini, then restart apache

extension_dir = "c:\php\ext"

>
> So, should I move php_mysql.dll to c:\php5, change the system path, or
> what? And what about php.ini showing sqlite instead of MySQL? Do I need to
> get the MySQL client libraries (what are they called and where do I put
> them - I already have some mysql dll's in the PHP libraries.
>
> Linda

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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-18 Thread eoghan

Hi

Linda H wrote:
For those who didn't join this thread at the beginning, I'm running 
MySQL 4.0.21, Apache 2.0.52 and PHP 5.0.2 on a Windows XP system.


I installed in the sequence - MySQL, then Apache, then PHP. MySQL was 
running when the others were installed (which is what the book I am 
using seemed to indicate). Apache was not running when PHP was installed.



What does php.ini have for this line
display_errors = On



Now we are getting somewhere. Even though error_reporting was set to 
E_ALL, display_errors was Off. I set it On and now I'm getting an error.


Fatal error: Call to undefined function mysql_connect() in C:\Program 
Files\Apache Group\Apache2\htdocs\example\test_connect.php on line 15




do you have this in your php.ini extensions?
extension=php_mysql.dll
Make sure you extension path is referencing its location also so it can 
find it...

for example:
extension_dir = "c:/php/ext/"

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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-18 Thread Linda H
For those who didn't join this thread at the beginning, I'm running MySQL 
4.0.21, Apache 2.0.52 and PHP 5.0.2 on a Windows XP system.


I installed in the sequence - MySQL, then Apache, then PHP. MySQL was 
running when the others were installed (which is what the book I am using 
seemed to indicate). Apache was not running when PHP was installed.



What does php.ini have for this line
display_errors = On


Now we are getting somewhere. Even though error_reporting was set to E_ALL, 
display_errors was Off. I set it On and now I'm getting an error.


Fatal error: Call to undefined function mysql_connect() in C:\Program 
Files\Apache Group\Apache2\htdocs\example\test_connect.php on line 15


the phpinfo() display doesn't reference MySQL at all. It does reference 
SQLite with the following info:


SQLite supportenabled:
PECL Module version 2.0-dev $Id: sqlite.c,v 1.146.2.2 2004/08/02 22:43:42 
iliaa Exp $

SQLite Library: 2.8.14
SQLite Encoding: iso8859

Directive: sqlite_assoc_case, Local Value: 0, Master Value: 0

So it looks like MySQL didn't get configured with PHP.

In the PHP FAQ on database issues, I found the following:

"
4. PHP 5 no longer bundles MySQL client libraries, what does this mean to 
me? Can I still use MySQL with PHP? I try to use MySQL and get "function 
undefined" errors, what gives?


Yes. There will always be MySQL support in PHP of one kind or another. The 
only change in PHP 5 is that we are no longer bundling the client library 
itself. Some reasons in no particular order:

   * Most systems these days already have the client library installed.
   * Given the above, having multiple versions of the library can get 
messy. For example, if you link mod_auth_mysql against one version and PHP 
against another, and then enable both in Apache, you get a nice fat crash. 
Also, the bundled library didn't always play well with the installed server 
version. The most obvious symptom of this being disagreement over where to 
find the mysql.socket Unix domain socket file.
   * Maintenance was somewhat lax and it was falling further and further 
behind the released version.
   * Future versions of the library are under the GPL and thus we don't 
have an upgrade path since we cannot bundle a GPL'ed library in a 
BSD/Apache-style licensed project. A clean break in PHP 5 seemed like the 
best option.


This won't actually affect that many people. Unix users, at least the ones 
who know what they are doing, tend to always build PHP against their 
system's libmyqlclient library simply by adding the --with-mysql=/usr 
option when building PHP. Windows users may enable the extension 
php_mysql.dll inside php.ini. Also, be sure libmysql.dll is available to 
the systems PATH. For more details on how, read the FAQ on 
setting 
up the Windows systems PATH. Because libmysql.dll (and many other PHP 
related files) exist in the PHP folder, you'll want to add the PHP folder 
to your systems PATH."


I added my PHP folder (C:\php5\) to my system path and restarted 
(libmysql.ddl is in php5). Still get the error. I enabled the extension 
php_mysql.dll in php.ini and Apache startup says it can't find it 
(php_mysql.dll is in C:\php5\ext).


So, should I move php_mysql.dll to c:\php5, change the system path, or 
what? And what about php.ini showing sqlite instead of MySQL? Do I need to 
get the MySQL client libraries (what are they called and where do I put 
them - I already have some mysql dll's in the PHP libraries.


Linda

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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-18 Thread Rick Emery

Quoting Linda H <[EMAIL PROTECTED]>:


I added the following to the top of my script:



Got all sorts of environment and path info.


In addition to the other excellent suggestions so far, make sure 
(looking at the phpinfo page, under "Configuration File Path") that 
your install is using the php.ini file you think it is. I got bit by 
this (I kept editing the php.ini file in one directory, but it was 
reading the file from another).


It really does sound like error reporting is turned off.

hth,
Rick


--
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
with your eyes turned skyward, for there you have been, and there
you will always long to return"
 -- Leonardo Da Vinci

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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-18 Thread kalinga
i recently met samekind of problem, could you pls specify the
OS, Apache, Php and MySQL vesrions you are using?

vk

On 7/18/05, Mark Rees <[EMAIL PROTECTED]> wrote:
> "Linda H" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I added the following to the top of my script:
> >
> >  >echo phpinfo();
> > ?>
> >
> > Got all sorts of environment and path info. Not anything about MySQL, but
> I
> > didn't see anything that looked obviously wrong, though I don't understand
> > a lot of it.
> >
> > I ried reinstalling MySQL, Apache, and PHP. No change.
> >
> > Linda
> 
> What does php.ini have for this line
> 
> display_errors = On
> 
> If it's off, set it on.
> 
> Mark
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
vk.

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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-18 Thread Mark Rees
"Linda H" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I added the following to the top of my script:
>
> echo phpinfo();
> ?>
>
> Got all sorts of environment and path info. Not anything about MySQL, but
I
> didn't see anything that looked obviously wrong, though I don't understand
> a lot of it.
>
> I ried reinstalling MySQL, Apache, and PHP. No change.
>
> Linda

What does php.ini have for this line

display_errors = On

If it's off, set it on.

Mark

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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-17 Thread Matt Darby

You should definitely see a listing for MySQL in phpinfo()...
What order did you install MySQL/PHP/Apache?

Linda H wrote:


I added the following to the top of my script:



Got all sorts of environment and path info. Not anything about MySQL, 
but I didn't see anything that looked obviously wrong, though I don't 
understand a lot of it.


I ried reinstalling MySQL, Apache, and PHP. No change.

Linda


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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-17 Thread Linda H

I added the following to the top of my script:



Got all sorts of environment and path info. Not anything about MySQL, but I 
didn't see anything that looked obviously wrong, though I don't understand 
a lot of it.


I ried reinstalling MySQL, Apache, and PHP. No change.

Linda 


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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-17 Thread Linda H



Try this just for kicks:



Nope - nothing :-(

See if this will output errors. It's rather hard to debug without error 
messages ;)


No kidding!


If I remember correctly, isn't php.ini supposed to be in c:/PHP?


It came in c:/php5 as php.ini-recommended. My instructions were to move it 
to c:\WINDOWS and rename to php.ini.


Linda

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



Re: [PHP] Re: Need help with PHP / MySQL connect problem

2005-07-17 Thread Matt Darby

Try this just for kicks:

See if this will output errors. It's rather hard to debug without error 
messages ;)

If I remember correctly, isn't php.ini supposed to be in c:/PHP?

Linda H wrote:


Thanks for the advice, Matt, but it doesn't seem to solve my problem.

php.ini is in the C:Program Files/WINDOWS directory and 
error_reporting was set to E_ALL.


I found php5ts.dll in the WINDOWS/system32 directory. I copied it to 
WINDOWS/system, just in case. My install instructions said to put it 
with my other dlls, which might be in either directory. Most of them 
are in system32.


Using this at the top of your script will allow PHP and MySQL to 
interact.
$_POST['dbconn']=mysql_select_db("database_name", 
mysql_connect("server_name","user_name","password"));



I put this in my script (changing parameters as appropriate) but got 
no results and no error messages. Any other ideas. I've spent hours on 
this, trying everything I could think of and I'm very frustrated.


The rest of my output is still suppressed if I put the connect script 
above it in the file.



It does sound like you have notices and warnings turned off in php.ini:
Find php.ini (not sure where it installs to in Windows version), and 
set error_reporting  = E_ALL.
This will show all notices and warnings generated by your PHP code; 
extremely usefull in debugging.


Matt Darby

Linda H wrote:

I'm running MySQL 4.0.21, Apache 2.0.52 and PHP 5.0.2 on a Windows 
XP system. I can run scripts with PHP and HTML statements and see 
correct output in my browser. But when I try to connect to MySQL I 
get nothing, including no error messages.


One book I have says to run the following scrip to test the 
connection. It should print either the Resource name or an error 
message:


  echo mysql_connect ('localhost','calendar','pass1234');  # host, 
user, password

?>

I get no output at all, and if the statement is placed in a larger 
script, above html/PHP output, it suppresses that as well.


Using the mysql monitor from the DOS command prompt, I can connect 
as user 'calendar' with password 'pass1234', select a database and 
execute SQL statements successfully.






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



Re: [PHP] Re: need help parsing named.conf file

2005-02-13 Thread rosenberger

> and "the named.conf" looks like.?

options {

# The directory statement defines the name server's working directory

directory "/var/lib/named";

# Write dump and statistics file to the log subdirectory.  The
# pathenames are relative to the chroot jail.

dump-file "/var/log/named_dump.db";
statistics-file "/var/log/named.stats";

# The forwarders record contains a list of servers to which queries
# should be forwarded.  Enable this line and modify the IP address to
# your provider's name server.  Up to three servers may be listed.

forwarders { 192.0.2.1; 192.0.2.2; };

# Enable the next entry to prefer usage of the name server declared in
# the forwarders section.

#forward first;

notify no;
};

# To configure named's logging remove the leading '#' characters of the
# following examples.
#logging {
#   # Log queries to a file limited to a size of 100 MB.
#   channel query_logging {
#   file "/var/log/named_querylog"
#   versions 3 size 100M;
#   print-time yes; // timestamp log entries
#   };
#   category queries {
#   query_logging;
#   };
#
#   # Or log this kind alternatively to syslog.
#   channel syslog_queries {
#   syslog user;
#   severity info;
#   };
#   category queries { syslog_queries; };
#
#   # Log general name server errors to syslog.
#   channel syslog_errors {
#   syslog user;
#   severity error;
#   };
#   category default { syslog_errors;  };
#
#   # Don't log lame server messages.
#   category lame-servers { null; };
#};

# The following zone definitions don't need any modification.  The first one
# is the definition of the root name servers.  The second one defines
# localhost while the third defines the reverse lookup for localhost.

zone "." in {
type hint;
file "root.hint";
};

zone "localhost" in {
type master;
file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};

BR/Torsten

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



Re: [PHP] Re: Need help... getting information from external xml document

2004-09-23 Thread Matt M.
> As John noted at the end... I do not have control over the format of
> the XML... but thanks I will try... BTW i am using PHP4 is
> SimpleXML able to be used and if so how?

I would just use John's regex idea, I am guessing (i could be wrong
though, I have been many times before) that the format is not going to
change much

$str =
file_get_contents('http://www.dhs.gov/dhspublic/getAdvisoryCondition');
preg_match('/CONDITION="([^"]+)"/',$str,$match);
echo $match[1];

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



Re: [PHP] Re: Need help... getting information from external xml document

2004-09-23 Thread GH
Sounds good... from that RegExpression what exactly is that returning?
just the value in the quotes?

Thanks 
Gary


On Thu, 23 Sep 2004 11:11:16 -0400, John Holmes
<[EMAIL PROTECTED]> wrote:
> From: "GH" <[EMAIL PROTECTED]>
> > BTW i am using PHP4 is
> > SimpleXML able to be used and if so how?
> 
> No, SimpleXML is for PHP5 only. You're probably better off using the regular
> expression method rather than loading an entire XML solution for such a
> small bit of code...
> 
> ---John Holmes...
> 
>

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



Re: [PHP] Re: Need help... getting information from external xml document

2004-09-23 Thread John Holmes
From: "GH" <[EMAIL PROTECTED]>
BTW i am using PHP4 is
SimpleXML able to be used and if so how?
No, SimpleXML is for PHP5 only. You're probably better off using the regular 
expression method rather than loading an entire XML solution for such a 
small bit of code...

---John Holmes... 

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


Re: [PHP] Re: Need help... getting information from external xml document

2004-09-23 Thread Matt M.
> >> I am new to php and xml and would like to know how I can set a
> >> variable (i.e $terror_threat_level) equal to the value of
> >> Threat_Advisory's Condition in the following that is available at
> >> http://www.dhs.gov/dhspublic/getAdvisoryCondition ...
> >>
> >>  
> >>  

if you are using php 5 you could try this:

$file = 'http://www.dhs.gov/dhspublic/getAdvisoryCondition';
$xml = simplexml_load_file($file);
print findAttribute($xml,'CONDITION');
 

function findAttribute($object, $attribute) {
  foreach($object->attributes() as $a => $b) {
   if ($a == $attribute) {
 $return = $b;
   }
  }
  if($return) {
   return $return;
  }
}

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



Re: [PHP] Re: Need help... getting information from external xml document

2004-09-23 Thread GH
As John noted at the end... I do not have control over the format of
the XML... but thanks I will try... BTW i am using PHP4 is
SimpleXML able to be used and if so how?

Sorry for the newbie question


On Thu, 23 Sep 2004 10:44:31 -0400, John Holmes
<[EMAIL PROTECTED]> wrote:
> From: "GH" <[EMAIL PROTECTED]>
> 
> >> I am new to php and xml and would like to know how I can set a
> >> variable (i.e $terror_threat_level) equal to the value of
> >> Threat_Advisory's Condition in the following that is available at
> >> http://www.dhs.gov/dhspublic/getAdvisoryCondition ...
> >>
> >>  
> >>  
> 
> Hmmm... I couldn't get SimpleXML to work with this data; maybe it doesn't
> pick up attributes or that XML could be better formed???
> 
> I'm sure there's an XML way to do it, but if you don't find anything, here's
> a quick way to match it with regular expressions.
> 
>  $str =
> file_get_contents('http://www.dhs.gov/dhspublic/getAdvisoryCondition');
> preg_match('/CONDITION="([^"]+)"/',$str,$match);
> echo $match[1];
> ?>
> 
> Off topic, I was thinking this XML would be "better formed" XML as:
> 
> ELEVATED
> 
> and then you can use:
> 
> $str =
> file_get_contents('http://www.dhs.gov/dhspublic/getAdvisoryCondition');
> $xml = simplexml_load_string($str);
> 
> but simplexml simply has one element, [0] => ELEVATED. You can't do $xml[0]
> or $xml->0 (since $xml  is an object), etc and you have to do
> 
> $threat = current($xml);
> echo $threat;
> 
> You can cast $xml to an array, but that still doesn't seem very intuitive:
> 
> $a = (array)$xml;
> echo $a[0];
> 
> I'm not an XML wiz by any means... is this just bad XML that SimpleXML is
> handling the best it can or is SimpleXML acting up?? If it's bad XML put out
> by DHS, then I can pass some messages up the chain... :)
> 
> ---John Holmes...
> 
>

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



Re: [PHP] Re: Need help... getting information from external xml document

2004-09-23 Thread John Holmes
From: "GH" <[EMAIL PROTECTED]>
I am new to php and xml and would like to know how I can set a
variable (i.e $terror_threat_level) equal to the value of
Threat_Advisory's Condition in the following that is available at
http://www.dhs.gov/dhspublic/getAdvisoryCondition ...
 
 
Hmmm... I couldn't get SimpleXML to work with this data; maybe it doesn't 
pick up attributes or that XML could be better formed???

I'm sure there's an XML way to do it, but if you don't find anything, here's 
a quick way to match it with regular expressions.


$str = 
file_get_contents('http://www.dhs.gov/dhspublic/getAdvisoryCondition');
preg_match('/CONDITION="([^"]+)"/',$str,$match);
echo $match[1];
?>

Off topic, I was thinking this XML would be "better formed" XML as:
ELEVATED
and then you can use:
$str = 
file_get_contents('http://www.dhs.gov/dhspublic/getAdvisoryCondition');
$xml = simplexml_load_string($str);

but simplexml simply has one element, [0] => ELEVATED. You can't do $xml[0] 
or $xml->0 (since $xml  is an object), etc and you have to do

$threat = current($xml);
echo $threat;
You can cast $xml to an array, but that still doesn't seem very intuitive:
$a = (array)$xml;
echo $a[0];
I'm not an XML wiz by any means... is this just bad XML that SimpleXML is 
handling the best it can or is SimpleXML acting up?? If it's bad XML put out 
by DHS, then I can pass some messages up the chain... :)

---John Holmes... 

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


Re: [PHP] Re: Need Help for Session

2004-08-27 Thread Pahlevanzadeh Mohsen
1.You must call session_start before making a HTML for
client.
2.Please use if (!session_is_registered('vb1'))
   session_register('vb1');


--- "S. Kang" <[EMAIL PROTECTED]> wrote:

> 
> 
> Afzal Hussain ) wrote:
> 
> > 
> > 
> > 
> > 
> >>Sir,
> >>I am afzal hussain from bangladesh. Acually i am
> getting some problem using session in php. This is
> the sample code that i have written,
> >>
> >>>session_start();
> >>
> //>>$vbl="This variable is registered";
> //>>session_register('vbl');
> 
> $_SESSION['vb1'] = "This variable is registered";
> 
> //>>echo $vbl;
> 
> echo $_SESSION['vb1'];
> 
> >>?>
> >>it shows this output.
> >>
> >>
> >>Warning: Cannot send session cookie - headers
> already sent by (output started at c:/program
> files/abria merlin/apache/htdocs/session.php:3) in
> c:/program files/abria
> merlin/apache/htdocs/session.php on line 4
> >>
> >>Warning: Cannot send session cache limiter -
> headers already sent (output started at c:/program
> files/abria merlin/apache/htdocs/session.php:3) in
> c:/program files/abria
> merlin/apache/htdocs/session.php on line 4
> >>
> >>Warning:
> open(/tmp\sess_178d4e9e23a4d7b1f061f93e7f172496,
> O_RDWR) failed: m (2) in c:/program files/abria
> merlin/apache/htdocs/session.php on line 4
> >>This variable is registered 
> >>
> >>Finding no other way i am sending this email to u.
> Could u pls tell me what s\could be the problem. and
> How i can i solve that problem.
> >>
> >>thanks you very much.
> >>afzal Hussian
> > 
> > 
> > 
> > 
> > -
> > Do you Yahoo!?
> > Win 1 of 4,000 free domain names from Yahoo! Enter
> now.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


=
-DIGITAL  SIGNATURE---
///Mohsen Pahlevanzadeh
 Network administrator  & programmer 
  My home phone is: +98213810146  
My email address is  
  m_pahlevanzadeh at yahoo dot com   
My website is: http://webnegar.net




__
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

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



RE: [PHP] Re: Need help

2004-04-14 Thread Ford, Mike [LSS]
On 09 April 2004 16:39, Strogg wrote:

[snip original problem for which a fix has been posted]

>   $taxrate = 0.175;  //local tax rate in UK is 17.5%

You should note that UK VAT is always rounded *down*, so that this:

>   $totalamount = $totalamount * (1 + $taxrate);

should be something like:

$totalamount += round($totalamount*$taxrate-0.00499, 2);

or:

$totalamount += floor($totalamount*taxrate*100)/100;

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Re: Need Help With gethostbyname()

2003-09-17 Thread Curt Zirzow
* Thus wrote Jennifer Goodie ([EMAIL PROTECTED]):
> > > I have a section of my script where I call gethostbyname($hostname) .
> > > For some host names that are not registered (according to register.com)
> > > I am still getting an IP address returned?
> > >
> > > What is happening?
> 
> > Well, try only the toplevel domain... For example, I have like
> > hns345667dsvdtrt34.telia.com, I doubt that is registred, but
> > telia.com sure
> > is... I hope.. :S
> 
> 
> To answer the original question, verisign has decided it is a good idea to
> wildcard the .com and .net TLDs to point to http://sitefinder.verisign.com,
> so if you do a look up on a non-existant domain in those TDLs it will now
> give an IP.  I believe a BIND patch has already been released to negate this
> change.

hmm.. that explains quite a bit. I was wondering how opera got
there on a lookup that should have been bad.

Time to block that IP now.. geesh. I dont want to be going to that
site if the lookup fails.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Re: Need Help With gethostbyname()

2003-09-17 Thread Evan Nemerson
BIND9 isn't the only game in town... Here's something from bugtraq

Worth noting (although a bit OT for php-general) that versign mananged to 
introduce a nice little XSS w/ this- see full-disclosure list for details

-Evan



--  Forwarded Message  --

Subject: Re: Verisign abusing .COM/.NET monopoly, BIND releases new
Date: Wed, 17 Sep 2003 18:19:32 -0400 (EDT)
From: Damaged Industries <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]

On Wed, 17 Sep 2003, SR wrote:
> > This is simply amazing, Verisign has just turned the .COM and .NET TLD
> > DNS servers up-side-down for their own economical gain and, in doing so,
> > disrupted network traffic for most of the Internet. Mail administrators
> > who use any non-existant DNSBL to mark email as spam suddenly has all
> > their mails deleted, people using localhost.localdomain.com on their
> > servers for administrative purposes are scrambling to find out the cause
> > of their problems and DNS problems arise everywhere as neg caching is
> > essentially disabled and all DNS caches have to cache each and every
> > randomly typed DNS query.
> >
> > The BIND patch that prevents this should be released Wednesday.
>
> djbdns already has a patch (make that two patches).
>
> They are available from djbdns.org

Several patches have been out:


Bind9 patch:
http://www.isc.org/products/BIND/delegation-only.html

Bind8 patch:
http://achurch.org/bind-verisign-patch.html

Djbdns patch:
http://tinydns.org/djbdns-1.05-ignoreip.patch

PowerDNS patch:
http://www.imperialviolet.org/binary/powerdns.patch

Userfriendly :)
http://ars.userfriendly.org/cartoons/?id=20030917&mode=classic



-- damaged

---


On Wednesday 17 September 2003 04:31 pm, Jennifer Goodie wrote:
> > > I have a section of my script where I call gethostbyname($hostname) .
> > > For some host names that are not registered (according to register.com)
> > > I am still getting an IP address returned?
> > >
> > > What is happening?
> >
> > Well, try only the toplevel domain... For example, I have like
> > hns345667dsvdtrt34.telia.com, I doubt that is registred, but
> > telia.com sure
> > is... I hope.. :S
>
> telia.com is a second level, not a top level, .com is the top level in your
> example.  Also, only looking up the second level is a bad idea.  In many
> cases the third level is actually being used to signify something (the
> host).  All of the hosts in our server farm use the same second level, but
> the third level signifies which box I'm talking about.  If I do an nslookup
> on my second level I'm going to get the IP bound to the webserver that
> hosts the corporate site (because that's how we have it set up), but if I
> do an nslookup on servername.domain.com (servername being the name of one
> of the servers in our farm) I'm going to get the IP for the host designated
> by servername.  For example, ftb.ca.gov (California franchise tax board) is
> not the same as dot.ca.gov (California Dept. of Transportation) which is
> not the same as cdfa.ca.gov (department of food and agriculture), but they
> all fall under the ca.gov second level because they are all government
> offices for the state of California, which falls under the .gov top level
> because it is a government branch within the United States.
>
> To answer the original question, verisign has decided it is a good idea to
> wildcard the .com and .net TLDs to point to http://sitefinder.verisign.com,
> so if you do a look up on a non-existant domain in those TDLs it will now
> give an IP.  I believe a BIND patch has already been released to negate
> this change.

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



Re: [PHP] Re: Need Help With gethostbyname()

2003-09-17 Thread DvDmanDT
Ok, I was wrong about top level stuff... My point was that you don't
register every box at like register.com, you only register secondlevel..
Register.com only checks second level (I guess), while php queries the name
on some dns server, which gives php another dns server and so on, until it
finds what it's looking for... Gah, jusst forget I even started typing this
message, I have no real idea what I'm talking about...

-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
"Jennifer Goodie" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> > > I have a section of my script where I call gethostbyname($hostname) .
> > > For some host names that are not registered (according to
register.com)
> > > I am still getting an IP address returned?
> > >
> > > What is happening?
>
> > Well, try only the toplevel domain... For example, I have like
> > hns345667dsvdtrt34.telia.com, I doubt that is registred, but
> > telia.com sure
> > is... I hope.. :S
>
> telia.com is a second level, not a top level, .com is the top level in
your
> example.  Also, only looking up the second level is a bad idea.  In many
> cases the third level is actually being used to signify something (the
> host).  All of the hosts in our server farm use the same second level, but
> the third level signifies which box I'm talking about.  If I do an
nslookup
> on my second level I'm going to get the IP bound to the webserver that
hosts
> the corporate site (because that's how we have it set up), but if I do an
> nslookup on servername.domain.com (servername being the name of one of the
> servers in our farm) I'm going to get the IP for the host designated by
> servername.  For example, ftb.ca.gov (California franchise tax board) is
not
> the same as dot.ca.gov (California Dept. of Transportation) which is not
the
> same as cdfa.ca.gov (department of food and agriculture), but they all
fall
> under the ca.gov second level because they are all government offices for
> the state of California, which falls under the .gov top level because it
is
> a government branch within the United States.
>
> To answer the original question, verisign has decided it is a good idea to
> wildcard the .com and .net TLDs to point to
http://sitefinder.verisign.com,
> so if you do a look up on a non-existant domain in those TDLs it will now
> give an IP.  I believe a BIND patch has already been released to negate
this
> change.

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



RE: [PHP] Re: Need Help With gethostbyname()

2003-09-17 Thread Jennifer Goodie
> > I have a section of my script where I call gethostbyname($hostname) .
> > For some host names that are not registered (according to register.com)
> > I am still getting an IP address returned?
> >
> > What is happening?

> Well, try only the toplevel domain... For example, I have like
> hns345667dsvdtrt34.telia.com, I doubt that is registred, but
> telia.com sure
> is... I hope.. :S

telia.com is a second level, not a top level, .com is the top level in your
example.  Also, only looking up the second level is a bad idea.  In many
cases the third level is actually being used to signify something (the
host).  All of the hosts in our server farm use the same second level, but
the third level signifies which box I'm talking about.  If I do an nslookup
on my second level I'm going to get the IP bound to the webserver that hosts
the corporate site (because that's how we have it set up), but if I do an
nslookup on servername.domain.com (servername being the name of one of the
servers in our farm) I'm going to get the IP for the host designated by
servername.  For example, ftb.ca.gov (California franchise tax board) is not
the same as dot.ca.gov (California Dept. of Transportation) which is not the
same as cdfa.ca.gov (department of food and agriculture), but they all fall
under the ca.gov second level because they are all government offices for
the state of California, which falls under the .gov top level because it is
a government branch within the United States.

To answer the original question, verisign has decided it is a good idea to
wildcard the .com and .net TLDs to point to http://sitefinder.verisign.com,
so if you do a look up on a non-existant domain in those TDLs it will now
give an IP.  I believe a BIND patch has already been released to negate this
change.

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



Re: [PHP] Re: need help with MySQL full text searching!!!!

2003-07-22 Thread Jason Wong
On Tuesday 22 July 2003 15:46, Angelo Zanetti wrote:
> Hi James so what you are saying is that if I am not running mysql
> 4.0.10-gamma then the full text search wont work.
>
> Strange because if I run the full text search on both full text indexed
> fields I get the correct resultset, however I only want to do a full text
> search on a column at a time, let me explain why:
>
> because I have a title field and an abstract field which are both full
> text, but i give the user the option of either searching for the title or
> the abstract thats why I have them both full text indexed but would only
> like to query 1 at a time.
>
> So I am still not sure what to do.Could you please give me more advice.
> thanx in Advance

This has absolutely nothing to do with PHP. Please take it to the MySQL list.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Chairman of the Bored.
*/


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



Re: [PHP] Re: need help with MySQL full text searching!!!!

2003-07-22 Thread Angelo Zanetti
Hi James so what you are saying is that if I am not running mysql
4.0.10-gamma then the full text search wont work.

Strange because if I run the full text search on both full text indexed
fields I get the correct resultset, however I only want to do a full text
search on a column at a time, let me explain why:

because I have a title field and an abstract field which are both full text,
but i give the user the option of either searching for the title or the
abstract thats why I have them both full text indexed but would only like to
query 1 at a time.

So I am still not sure what to do.Could you please give me more advice.
thanx in Advance

Angelo


- Original Message -
From: "James Rodenkirch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 6:27 PM
Subject: [PHP] Re: need help with MySQL full text searching


> You need to use mysql 4.0.10-gamma for full text searching to work
>
> Angelo Zanetti wrote:
>
> > Hi
> >
> > I have a table which contains 3 fields (ID, Title, Abstract) the title
and abstract fields have been fulltext indexes like this:
> >
> > ALTER TABLE biblio ADD FULLTEXT (title,abstract);
> >
> > that worked fine, however my problem is whenever I want to do a select
statement only comparing 1 of the columns to inputted data ( in a Select
statement):
> >
> > $result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title) AGAINST
('$searchString')");
> >
> > It gives me this error: Can't find FULLTEXT index matching the column
list. It appears that i cant just compare a single fulltext indexed column
if there are other fulltext indexed columns. When I try it with both columns
then it works but I just want to compare 1 column. eg:
> > $result = mysql_query("SELECT * FROM Biblio WHERE MATCH (title,
abstract) AGAINST ('$searchString')");
> >
> > So is there anyway that I can just compare 1 column with text entered?
Do I have t make some sort of temporary table to do this? All the examples I
have found show the select statement with 2 columns or if they use 1 coumn
its because there is only 1 column in their table.
> >
> > Any help would be appreciated!
> >
> > TIA
> >
> > Angelo
> >
> > ps. sorry that this may be a bit off topic
> >
>
>
> --
> 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



RE: [PHP] Re: Need Help: Please click on Test Link

2003-07-17 Thread Brian S. Drexler
All I got was "Error"

-Original Message-
From: Peter Clarke [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 7:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Need Help: Please click on Test Link


Suhas Pharkute wrote:
> http://sspsoft.com/test/ip2ll.php (in case if you cannot get it, please
> click on http://ns1.webhostdns.us and then click on the website link.)
>
> which should identify your Country, State, City. Please click on one of
the
> buttons to provide feedback.
>
I'm in London, England
and got the following result:
United Kingdom, England, Southend-on-Sea

So providing feedback with your options is a little tricky.
England is a country not a state. It'll cause confusion if you regard it
as such.
Southend-on-Sea is not where I'm located. Close but no cigar :)

Peter


--
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



RE: [PHP] RE: Need help with ?> vs. php?>

2003-03-05 Thread John W. Holmes
> That's fixed. Thanks.
> 
> Now, another problem. The data I capture in a form (web page 1) are
not
> received by the PHP page (web page 2). Is there something different
with
> the
> previous version of PHP?

Register_globals

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



Re: [PHP] RE: Need help with ?> vs. php?>

2003-03-05 Thread R'twick Niceorgaw
set register_globals=on in php.ini or use $_POST/$_GET  super global array
- Original Message -
From: "LeTortorec, Jean-Louis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 05, 2003 12:14 PM
Subject: [PHP] RE: Need help with ?> vs. php?>


> That's fixed. Thanks.
>
> Now, another problem. The data I capture in a form (web page 1) are not
> received by the PHP page (web page 2). Is there something different with
the
> previous version of PHP?
>
>
>  Thanks to all of you for your help.
>
>
> Jean-Louis
>
>
> >  -Original Message-
> > From: LeTortorec, Jean-Louis
> > Sent: Wednesday, March 05, 2003 11:59 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: Need help with ?> vs. php?>
> >
> > Hello everyone,
> >
> > I've installed the Apache v2.0.44 with PHP4.3.1., under Windows.
> >
> > My pages starting and ending with "" don't work anymore. I would
> > have to change them to "".
> >
> > Do you know if there is a way for keeping " >
> > Thanks for your help.
> >
>



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



Re: [PHP] Re: Need help storing and displaying html/text!

2003-02-10 Thread Jason Wong
On Tuesday 11 February 2003 07:03, Shawn McKenzie wrote:
> Hmmm...  I guess no one is doing this???  Seems fairly common.

Patience. You should allow 1 day to give every list subscriber a chance to 
read your post.

> "Shawn McKenzie" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> > I have a form and I want the user to be able to enter html in a text
> > area. This will then be stored in an array in a config file.  Example
> > $htmlstuff[1] = '

Re: [PHP] Re: Need help.

2003-01-28 Thread 1LT John W. Holmes
> - Original Message - Thkiat wrote:
> > Can someone tell me what should I do to solve this problem?

Of course...

> > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result
> > resource in /home/epcc/public_html/exoops/class/database/mysql.php on
line
> > 134

Fix your problem on line 134

> > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result
> > resource in /home/epcc/public_html/exoops/class/database/mysql.php on
line
> > 134

Same thing here...

> > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result
> > resource in /home/epcc/public_html/exoops/class/database/mysql.php on
line
> > 134

and here...

> > Warning: chmod failed: Operation not permitted in
> >
/home/epcc/public_html/exoops/modules/PP-News/include/admin_envois_mails.php
> > on line 489

Ah, this is different. Here you'd want to fix your problem on line 489.

> > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL
result
> > resource in /home/epcc/public_html/exoops/class/database/mysql.php on
line
> > 134

and again back to the line 134 thing that should be fixed by now.

> > Warning: chmod failed: Operation not permitted in
> >
/home/epcc/public_html/exoops/modules/PP-News/include/admin_envois_mails.php
> > on line 489

I already covered this one, right?

> > Erreur : Directory
/home/epcc/public_html/exoops/modules/PP-News/archives/
> > Directory , aucune archive n'a été crée
> > Newsletter sent to 2 users

---John Holmes...

PS: Your query is failing and you can't do chmod() because you're running as
the web server. Post your code if you want more help.


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




Re: [PHP] Re: Need help.

2003-01-28 Thread Rick Emery
Show us your code...we can't read your mind.
- Original Message - Thkiat wrote:
> Can someone tell me what should I do to solve this problem?
>
> Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
> resource in /home/epcc/public_html/exoops/class/database/mysql.php on line
> 134
>
> Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
> resource in /home/epcc/public_html/exoops/class/database/mysql.php on line
> 134
>
> Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
> resource in /home/epcc/public_html/exoops/class/database/mysql.php on line
> 134
>
> Warning: chmod failed: Operation not permitted in
> /home/epcc/public_html/exoops/modules/PP-News/include/admin_envois_mails.php
> on line 489
>
> Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
> resource in /home/epcc/public_html/exoops/class/database/mysql.php on line
> 134
>
> Warning: chmod failed: Operation not permitted in
> /home/epcc/public_html/exoops/modules/PP-News/include/admin_envois_mails.php
> on line 489
> Erreur : Directory /home/epcc/public_html/exoops/modules/PP-News/archives/
> Directory , aucune archive n'a été crée
> Newsletter sent to 2 users
>
>

--
Sebastian Mendel

[EMAIL PROTECTED]

www.sebastianmendel.de
www.tekkno4u.de
www.nofetish.com


--
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




Re: [PHP] Re: need help with project

2002-11-03 Thread Kevin Myrick
Check out FFL on Sourceforge.net. Currently, it is
still a standalone PHP app, but in the near/coming
soon future they are going to have it as a PHPWebsite
Module.

That is nice for me, since I have just converted to
PHPWebsite (would have used nuke, but it pissed me off
when it wouldn't let me do ANYTHING to config and
install), so I will probably go ahead and download it,
add it to my site somewhere, then use the module when
it comes out.

Will be nice to see how it works.

Hope that helps somewhat.

Kevin Myrick
www.ultimatealchemy.com

--- David Jackson <[EMAIL PROTECTED]> wrote:
> Karl --
> Before you go "reinventing the wheel" , you might
> check 
> http://freshmeat.net ... of course there is nothing
> actually wrong with 
>   "reinventing the wheel" *grin*
> 
> David Jackson
> 
> Karl James wrote:
> > Hello people
> >  
> > Im in need help with creating a system where it
> will let me 
> > Add/drop players off a web page..basically of a
> roster with salary cap
> > control
> > And I want to do trades as well
> > This is for a fantasy football page.
> >  
> > And I need to have username and passwords so my
> owners can login and
> > there is no cheating..
> >  
> > http://www.ultimatefootballleague.com/index4.shtml
> >  
> > This is my site.
> >  
> > Please email me directly if you are interested in
> helping.
> >  
> > Thanks
> > Karl james 
> >  
> >  
> > 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

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




RE: [PHP] Re: Need help with HTTP-Authentication

2002-10-18 Thread Davy Obdam
Hi David,.

> Http authentication is probly  not what you would want to 
> use.  Especially if you want to program in timeouts, you 
> would be better off using session based login variables.  
> Cookies are even better with an encrypted pasword that has a 
> windows of time that you have to goto other pages to renew.
> 
> Why HTTP auth?
> 
> Is it mandatory?

Well its not mandatory i gues. I just thought that using
HTTP-Authentication was one of the more secure ways of a login system?
But i have heared not thats not the case, so i might go for a login
system with sessions instead, or cookies. What would u use and why? What
excactly do u mean with timeouts?
 
> I know this hasnt been any help, sorry!

Thats okay;-) Keeps the discusion alive;-)

Best regards,
 
Davy Obdam,
mailto:info@;davyobdam.com



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




Re: [PHP] Re: Need help with HTTP-Authentication

2002-10-16 Thread dwalker

direct authentication with http headers

http://www.yourfavoritepage.com/login.php?v=nogo' );
}
?>




THIS E-MAIL MESSAGE AND ALL ATTACHMENTS TRANSMITTED HEREWITH ARE TRADE
SECRET AND/OR CONFIDENTIAL INFORMATION INTENDED ONLY FOR THE VIEWING AND
USE OF ADDRESSEE.  IF THE READER OF THIS MESSAGE IS NOT THE INTENDED
RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY REVIEW, USE, COMMUNICATION,
DISSEMINATION, DISTRIBUTION OR COPYING OF THIS COMMUNICATION IS PROHIBITED.
IF YOU HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY THE SENDER
IMMEDIATELY BY TELEPHONE OR ELECTRONIC MAIL, AND DELETE THIS MESSAGE AND
ALL COPIES AND BACKUPS THEREOF.  THANK YOU FOR YOUR COOPERATION.

-Original Message-
From: BAROILLER <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>;
[EMAIL PROTECTED] <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Wednesday, October 16, 2002 2:15 AM
Subject: [PHP] Re: Need help with HTTP-Authentication


>Hi,
>
>a simple question.. :)
>how do you do ?
>You can use 2 methods :
>with a .htaccess file on your webserver, updated with your table fields
>or a direct authentification with http headers and a little bit of php...
>Tell me more? may be I could help you.
>
>Regards,
>P.E. Baroiller
>
>"Davy Obdam" <[EMAIL PROTECTED]> a écrit dans le message de news:
>001901c2747e$fa0184a0$[EMAIL PROTECTED]
>> Hi People,.
>>
>> I have a problem with HTTP-Authentication, i have 2 users in my
>> database, and i want both to be able to login. However it works, but
>> only the first user is able to login. I Use a MySQL 3.23.xx database,
>> PHP 4.2.3 and Apache 2.0.40. Can anyone help me with this, any help
>> would be greatly apreciated. Thanks already;-)Maybe some examples?? ;-)
>>
>> Best regards,
>>
>> Davy Obdam,
>> mailto:[EMAIL PROTECTED]
>>
>>
>>
>>
>
>
>
>--
>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


Re: [PHP] Re: need help

2002-08-11 Thread Matt

> From: "B.C. Lance" <[EMAIL PROTECTED]>
> Sent: Sunday, August 11, 2002 10:17 AM
> Subject: Re: [PHP] Re: need help
> 
> Matt wrote:
> > if(0 == $row['gid'])
> 



> ahhh. let the parser do the check. works great if you are not comparing
> with 2 variables :)
>
> in fact, another way to avoid this kinda pitfall, switch is another
> alternative. but of course, switch has its pitfall too.  ;)

Yeah, it doesn't always work, but it adds to the reliablity of the code.  In
my code, it's more often used then not.  It's hard to think that way though,
as it's backwards logic, at least to me.  I always think it first the other
way ($val == constant), and type it backwards :)




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




Re: [PHP] Re: need help

2002-08-11 Thread B.C. Lance

ahhh. let the parser do the check. works great if you are not comparing 
with 2 variables :)

in fact, another way to avoid this kinda pitfall, switch is another 
alternative. but of course, switch has its pitfall too.  ;)


Matt wrote:
> if(0 == $row['gid'])
> 
> 
> 



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




Re: [PHP] Re: need help

2002-08-11 Thread Matt

> From: "B.C. Lance" <[EMAIL PROTECTED]>
> Sent: Sunday, August 11, 2002 9:53 AM
> Subject: [PHP] Re: need help


> to do a comparison between two values / variables, you have to use ==
> instead of =
> = is an assignment while == is a comparison operator
>
> if($row['gid'] == 0)

I write these this way so that the php parser nags me about it if I forget
the other equal sign:

if(0 == $row['gid'])




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




Re: [PHP] Re: Need Help with register_globals OFF

2002-08-03 Thread Monty

Well, I just "upgraded" a number of PHP scripts to function with
register_globals turned off, and now better understand what's required to
work with variables more securely.

I wanted to share that the extract() command turned out to be a big help.
Using it meant I didn't have to put $_POST[' '] around every variable passed
by a form. Instead, I put one or both of these lines of code at the
beginning of scripts that use forms or receive vars passed via the URL:

extract($_POST);
extract($_GET);

extract() creates local variables using the 'key' and 'value' from the
$_POST or $_GET arrays. I even discovered it works with multidimensional
arrays that may be passed by forms. In that case, if I have an array named
"formvar" that collects all data from the form (i.e., $formvar['name'],
$formvar['address'], etc.), then I use extract this way:

extract($_POST['formvar']);

This will create local variables named $name and $address that contain the
values passed from the form. Here's where you can find more about this
function: http://www.php.net/manual/en/function.extract.php

One thing to remember is that if you put extract() in a custom function
(which I did initially), it won't really work because the variables are
created only within the scope of the function, so, as soon as it returns to
the script, the vars it created are released.

Monty



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




Re: [PHP] Re: Need Help with register_globals OFF

2002-08-02 Thread Monty

Thanks for the tips, Justin. Sounds like a good idea.

Do you, or anyone, know if the $_POST vars stay defined even after moving on
to another page? Do I also need to unset $_POST after passing the vars each
time?


> From: [EMAIL PROTECTED] (Justin French)
> Newsgroups: php.general
> Date: Sat, 03 Aug 2002 15:46:57 +1000
> To: Monty <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Re: Need Help with register_globals OFF
>> 
>> Anyone want to share any tips on how to deal with form vars passed to a
>> script with register_globals turned off? Do you simply refer to them
>> directly with $_GET['var'] or do you initialize vars locally that contain
>> all the $_GET vars?
> 
> Well I usually choose to POST forms, not GET them, but yeah, I just deal
> with the vars as $_POST['var'].
> 
> If I'm referencing the vars a LOT, I make regular $vars out of each element
> in the POST array:
> 
> $myvar = $_POST['myvar'];
> 
> 
> If there's a lot of them, I do it with a foreach loop... something like:
> 
>  foreach($_POST as $key => $value)
> {
> $$key = $value;
> }
> ?>
> 
> ...will do the trick.  It achieves the same as register_globals, but only
> from one source, the POST array.


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




Re: [PHP] Re: Need Help with register_globals OFF

2002-08-02 Thread Justin French

on 03/08/02 3:35 PM, Monty ([EMAIL PROTECTED]) wrote:

> Well, to answer my own question, I found a decent tutorial on using sessions
> with the new register_globals off here:
> 
> http://www.wdvl.com/Authoring/Languages/PHP/Maintaining_state/session_variab
> les.html
> 
> Anyone want to share any tips on how to deal with form vars passed to a
> script with register_globals turned off? Do you simply refer to them
> directly with $_GET['var'] or do you initialize vars locally that contain
> all the $_GET vars?

Well I usually choose to POST forms, not GET them, but yeah, I just deal
with the vars as $_POST['var'].

If I'm referencing the vars a LOT, I make regular $vars out of each element
in the POST array:

$myvar = $_POST['myvar'];


If there's a lot of them, I do it with a foreach loop... something like:

 $value)
{
$$key = $value;
}
?>

...will do the trick.  It achieves the same as register_globals, but only
from one source, the POST array.


Justin


Justin


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




Re: [PHP] Re: Need help to choose hosting!

2002-08-02 Thread Andrey Hristov

http://ispcheck.com is the place. Listing of many webhostings. Go and see.

Regards,
Andrey

> > Hey php-general,
> >
> >   i want to buy hosting. but i can't find good one for me. maybe
> >   someone could point some links. but this is what i need!
> >
> >   Storage up to 100MB
> >   normal transfer limit(best would be without)
> >   CGI/Perl/PHP/ASP/SSI/SSL
> >   MySQL database (can be only 1)
> >   some pop3 mailboxes
> >   free domain transfer (maybe free domain if i pay for 1 year ahead)
> >   FTP access
> >   SSH access
> >   Shell capability
> >   up to 3 background processes
> >
> >   if anyone know combination like that i would appreaciate your help!
> >   thanks
> >
> > --
> > Best regards,
> >  Mantas
> >
> > Contacts:
> > [EMAIL PROTECTED]
> >
> 
> 
> 
> -- 
> 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




Re: [PHP] Re: need help with uploading images

2002-07-29 Thread Deadsam

This looks good but I just have one question about it if you don't mind,
what if someone was uploading a gif or a PNG file? can it be made to only
detect jpgs?
Thanks in advance
Deadsam

> Try it this way, it will check if it is a jpeg and it has a horizontal
> and vertical size so you can be pretty sure it is an image file.
> (you do not need the gd package for getimagesize())
>
>
> /** Check for the type of the image : only allow jpeg's */
> $im = getimagesize($_FILES['uploadFile');
> if(!($im[2] == 2 && $im[0] > 0 && $im[1] > 0)){
> echo "You can only upload jpg images.";
> exit();
> }
>
>
>
>
> --
> regards,
> Tom
>



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




Re: [PHP] Re: need help with uploading images

2002-07-29 Thread Tom Rogers

Hi,

Tuesday, July 30, 2002, 3:52:23 AM, you wrote:
D> maybe it would be easier to show you the part of code I'm using,

D> }
D> /** Check for the type of the image : only allow jpeg's */
D> if($_FILES['uploadFile']['name']['type']!="image/jpeg"){
D> echo "You can only upload jpg images.";
D> exit();
D> }
D> The one above is the one I'm having problems with, it should work by looking
D> at it, it all makes sense, but it won't for some strange reason. I heard
D> there is a difference in browsers to get it to work at time, so I tried
D> using pjpeg instead and got the same result. If I can't get this to work
D> somehow then I will be trying your method Oscar, which just means I'll have
D> to change the code for it all, no big deal it's not much of a change anyhow,
D> if it was pages upon pages then it would be lol.
D> Thanks for all your help guys, and the security issue I never even realized,
D> so I guess I'll have to go hunting for away to resolve that too if I'm going
D> to use it for all users instead of administration uploading.
D> Your help is much appreciated
D> Sam
Try it this way, it will check if it is a jpeg and it has a horizontal
and vertical size so you can be pretty sure it is an image file.
(you do not need the gd package for getimagesize())


/** Check for the type of the image : only allow jpeg's */
$im = getimagesize($_FILES['uploadFile');
if(!($im[2] == 2 && $im[0] > 0 && $im[1] > 0)){
echo "You can only upload jpg images.";
exit();
}




-- 
regards,
Tom


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




Re: [PHP] Re: need help with your code?

2002-04-11 Thread Analysis & Solutions

Hi Christopher:

On Wed, Apr 10, 2002 at 05:27:18PM -0400, Christopher J. Crane wrote:

> Ok time out...the problem was simple I had each of the functions one 
it's
> own line because it was simple to see. When I add code to the 
functions then
> I do make it as indicated and easier to read. The problem was that I 
did not
> realize the 80 character columns width. I apologize but did not think 
it was
> everyone's job to critisize. I appreciate the help, I really do. I 
will be
> sure to keep the 80 character width issue in mind when posting.
  
It's not really about 80 chars.  It's about readable code.  Nesting of
appropriate items makes it easier to quickly understand the logic of
your program.  Such items include:  if, for, while, function, switch,
classes, etc.  In essence, any structure that has a start and an end.

This is a standardized practice among programmers.  It's become 
standardized for one reason: it's easier to read.  Check out these
examples and you tell me which you can grasp more quickly?

Example One:
   if ($Easy == 'no') {echo 'why do you need to struggle?';
   echo 'more stuff that you need to decipher';
   echo 'Hmm... did that if end already?;}
   echo 'Or is it still processing if $Easy = no?';

Example Two:
   if ($Easy == 'yes') {
  echo 'why do you need to struggle?';
  echo 'more stuff that you need to decipher';
  echo 'Hmm... did that if end already?;
   }
   echo 'Why, yes it did!';


Enjoy,

--Dan

--
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




RE: [PHP] Re: Need help with a stupid problem!

2001-11-29 Thread De Necker Henri

My output is still the same!
It looks like this : ba = \'DA\' 

:)

-Original Message-
From: Julio Nobrega Trabalhando
[mailto:[EMAIL PROTECTED]]
Sent: 29 November 2001 13:54
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Need help with a stupid problem!


  Worry not, easier typing:

$search .= " ba = '$b'";

  If above doesn't satify the needs, maybe you are mysql_escape_string();
it?

--

Julio Nobrega

No matter where you go, &this.

"De Necker Henri" <[EMAIL PROTECTED]> wrote in message
3A8ED7A62794D311AA7700508B6164EC08DCA3E5@SCPTS01">news:3A8ED7A62794D311AA7700508B6164EC08DCA3E5@SCPTS01...
> Hi there!
>
> I want to do the following piece SQL query :
>$search .= " ba = '".$b."'";
>
> I want it to be like the following :
>ba = 'someting'
>
> But this is what i get :
>   ba = \'someting\'
>
> What am i doing wrong?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Need help on putting variable into

2001-08-28 Thread Christopher William Wesley

On Tue, 28 Aug 2001, Hugh Danaher wrote:

> I think at one time I tried using double quotes but didn't get good results.
> If you have time to answer, why the backslash and what the hell is "foo"?

Using the backslash escapes the double quote ... tells php to not use the
double quote (as it does to end a string assignment), but to print it
instead.  And "foo" is just a seemingly universal place-holder for a
string or something else that you can replace with just about anything.

~Chris   /"\
 \ / Pine Ribbon Campaign
Microsoft Security Specialist X  Against Outlook
The moron in Oxymoron.   / \ http://www.thebackrow.net


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Need help on putting variable into

2001-08-28 Thread Hugh Danaher

Andy,
I think at one time I tried using double quotes but didn't get good results.
If you have time to answer, why the backslash and what the hell is "foo"?
- Original Message -
From: Andy Ladouceur <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 8:51 PM
Subject: Re: [PHP] Re: Need help on putting variable into 


> No problem.
> With the space in there, it considered Company as something separate...
> -Andy
> Hugh Danaher <[EMAIL PROTECTED]> wrote in message
> 000801c12f74$62b93020$3907f4d8@win95">news:000801c12f74$62b93020$3907f4d8@win95...
> > Andy,
> > Thank you.  It Works!
> > Hugh
> > - Original Message -
> > From: Andy Ladouceur <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, August 27, 2001 8:35 PM
> > Subject: [PHP] Re: Need help on putting variable into 
> >
> >
> > > Well,think about it like this:
> > > If you did replace $comp name with ABC Company, this is what you'd
get:
> > >
> > > 
> > >
> > > Not quite right, eh? This will solve your  problem:
> > > print "";
> > >
> > > =)
> > > -Andy
> > > Hugh Danaher <[EMAIL PROTECTED]> wrote in message
> > > 001201c12f71$75a45b40$c1fcb3d1@win95">news:001201c12f71$75a45b40$c1fcb3d1@win95...
> > > Help.  I have a page with a form with lots of text boxes which can be
> > filled
> > > with data from a text file.  the fopen() and fgets() works, and the
text
> > > boxes which require numbers have no problems.  But, I have text boxes
> > which
> > > require several words of text and they refuse to work right.  The
first
> > word
> > > makes it in the box, but the rest of the words are lost.
> > >
> > > As an example, the data file contains:  ABC Company, Inc. in the spot
> for
> > > $comp_name.  If I call for this variable elsewhere outside of a text
> box,
> > it
> > > prints in full, but when used by the following, it prints only: ABC
> > >
> > > print "";
> > >
> > > There must be something blindingly obvious that I'm missing.  Please
> help.
> > > Thanks, Hugh
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Need help on putting variable into

2001-08-27 Thread Andy Ladouceur

No problem.
With the space in there, it considered Company as something separate...
-Andy
Hugh Danaher <[EMAIL PROTECTED]> wrote in message
000801c12f74$62b93020$3907f4d8@win95">news:000801c12f74$62b93020$3907f4d8@win95...
> Andy,
> Thank you.  It Works!
> Hugh
> - Original Message -
> From: Andy Ladouceur <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, August 27, 2001 8:35 PM
> Subject: [PHP] Re: Need help on putting variable into 
>
>
> > Well,think about it like this:
> > If you did replace $comp name with ABC Company, this is what you'd get:
> >
> > 
> >
> > Not quite right, eh? This will solve your  problem:
> > print "";
> >
> > =)
> > -Andy
> > Hugh Danaher <[EMAIL PROTECTED]> wrote in message
> > 001201c12f71$75a45b40$c1fcb3d1@win95">news:001201c12f71$75a45b40$c1fcb3d1@win95...
> > Help.  I have a page with a form with lots of text boxes which can be
> filled
> > with data from a text file.  the fopen() and fgets() works, and the text
> > boxes which require numbers have no problems.  But, I have text boxes
> which
> > require several words of text and they refuse to work right.  The first
> word
> > makes it in the box, but the rest of the words are lost.
> >
> > As an example, the data file contains:  ABC Company, Inc. in the spot
for
> > $comp_name.  If I call for this variable elsewhere outside of a text
box,
> it
> > prints in full, but when used by the following, it prints only: ABC
> >
> > print "";
> >
> > There must be something blindingly obvious that I'm missing.  Please
help.
> > Thanks, Hugh
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Need help on putting variable into

2001-08-27 Thread Hugh Danaher

Andy,
Thank you.  It Works!
Hugh
- Original Message -
From: Andy Ladouceur <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 27, 2001 8:35 PM
Subject: [PHP] Re: Need help on putting variable into 


> Well,think about it like this:
> If you did replace $comp name with ABC Company, this is what you'd get:
>
> 
>
> Not quite right, eh? This will solve your  problem:
> print "";
>
> =)
> -Andy
> Hugh Danaher <[EMAIL PROTECTED]> wrote in message
> 001201c12f71$75a45b40$c1fcb3d1@win95">news:001201c12f71$75a45b40$c1fcb3d1@win95...
> Help.  I have a page with a form with lots of text boxes which can be
filled
> with data from a text file.  the fopen() and fgets() works, and the text
> boxes which require numbers have no problems.  But, I have text boxes
which
> require several words of text and they refuse to work right.  The first
word
> makes it in the box, but the rest of the words are lost.
>
> As an example, the data file contains:  ABC Company, Inc. in the spot for
> $comp_name.  If I call for this variable elsewhere outside of a text box,
it
> prints in full, but when used by the following, it prints only: ABC
>
> print "";
>
> There must be something blindingly obvious that I'm missing.  Please help.
> Thanks, Hugh
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: need help w/ variables

2001-07-22 Thread ReDucTor

that error is because the php error checking had been changed from the
default...but still some do have problems... :D
- Original Message -
From: Van Tate Jr. <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 5:01 PM
Subject: Re: [PHP] Re: need help w/ variables


> Ah! But never forget...the code in some books have bugs too.
>
> Van
>
> At 12:47 AM 7/23/01, you wrote:
> >it was my error reporting along   i copied that script dtraight from the
> >text book so i knew it wasnt the variables themselves
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: need help w/ variables

2001-07-22 Thread Van Tate Jr.

Ah! But never forget...the code in some books have bugs too.

Van

At 12:47 AM 7/23/01, you wrote:
>it was my error reporting along   i copied that script dtraight from the
>text book so i knew it wasnt the variables themselves


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: need help w/ variables

2001-07-22 Thread ReDucTor

yep, thought so :D
- Original Message - 
From: Virgil Claritt <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 3:47 PM
Subject: [PHP] Re: need help w/ variables


> it was my error reporting along   i copied that script dtraight from the
> text book so i knew it wasnt the variables themselves
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]