Hi,
I would like to know if there is a way how PHP code can extract from
ElementID some property values.
for example, i have the following PHP page :
?php
print div class='maindiv' id='id_maindiv'my main div/div;
$new_Width = somefunction();
print div class='childdiv' id='id_childdiv'
?php
include ('../phpscripts/connect.php');
$id = $_GET['id'];
$query = SELECT * FROM mypdfs WHERE id =$id;
$result= mysql_query($query) or die('Error, query failed');
if (!mysql_num_rows($result))
{
die(No matching records were found in the database.);
}
while ($row =
I guess the problem is here :
$query = SELECT * FROM mypdfs WHERE id =$id;
Change it to :
$query = SELECT * FROM mypdfs WHERE id =.$id;
-Message d'origine-
De : Ross [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 8 mars 2007 09:39
À : php-general@lists.php.net
Objet : [PHP] server error or
Please include the list in replies.
Budi Setiawan wrote:
I suggest you read up on classes and the syntax thereof in the manual -
you're not getting it at the moment. Remember, PHP is not C++.
what does that mean?
It means...
1) Read the manual: http://php.net/oop5
2) PHP is not C++
I
Can someone explain to me why this used to work but then stopped
header(Content-length: $size);
header(Content-type: $type);
header(Content-Disposition: attachment; filename=$name);
and this now works
header(Content-length: .$size);
header(Content-type: .$type);
header('Content-Disposition:
This script change does not make a difference. What could have been turned
on/off on the server to cause this?
I can output the binary to screen but I cannot create the pdf.
R.
Flavien CHANTELOT [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I guess the problem is here :
$query =
Ross wrote:
Can someone explain to me why this used to work but then stopped
header(Content-length: $size);
header(Content-type: $type);
header(Content-Disposition: attachment; filename=$name);
and this now works
header(Content-length: .$size);
header(Content-type: .$type);
Hi!
I am running some tests for implementing variable metadata using
Oracle's XMLTYPE. Creating the XML and inserting it into the database
works fine, however when trying to retrieve data it truncates the
returned results. The code I am using to fetch the data is as follows:
$row_sql =
Alain Roger wrote:
Hi,
I would like to know if there is a way how PHP code can extract from
ElementID some property values.
for example, i have the following PHP page :
?php
print div class='maindiv' id='id_maindiv'my main div/div;
$new_Width = somefunction();
print div class='childdiv'
Hi all, i have a problem with this script... could anybody help me??
Regards,
titlePassword change/title/head
body bgcolor=#ff
?php
//Written by Dave Edick on 6/22/99
// customize these variables for your install
$base_dn=ou=People;
$ldap_server=localhost;
error_reporting(E_ERROR);
Hello Skip Evans,
$filename=;
$fp=fopen($filename,'r');
while(!feof($fp)){
echo fread($fp,1024);
}
//log something that the client complete the download
Best regards,
=== At 2007-03-08, 07:06:46 you wrote: ===
Hey all,
I have a need to monitor a
Hi,
again me with the silly questions...
I need a script that will take data from MySQL database and display one
row each day.
I have googled, but with no luck.
The database retrieving mechanism is of course clear but I really dont
know how to do a 24h delay before the next row is
Delta Storm wrote:
Hi,
again me with the silly questions...
you could have another table in your database that logs the id of the
current joke and the date it was shown on, then simply 'select
jokeid,dateshown from jokelog order by dateshown limit 1' will get you
the last joke and when
2007. 03. 8, csütörtök keltezéssel 09.14-kor Alain Roger ezt írta:
Hi,
I would like to know if there is a way how PHP code can extract from
ElementID some property values.
for example, i have the following PHP page :
?php
print div class='maindiv' id='id_maindiv'my main div/div;
concatenation changes?? I've noticed this too, you can either do what you
did, or put {} around variable within quotes..
- Original Message -
From: Ross [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, March 08, 2007 4:57 AM
Subject: [PHP] why did it stop working?
Hi,
again me with the silly questions...
I need a script that will take data from MySQL database and
display one
row each day.
I have googled, but with no luck.
The database retrieving mechanism is of course clear but I
really dont
know how to do a 24h delay before the next
On 3/8/07, Ross [EMAIL PROTECTED] wrote:
?php
include ('../phpscripts/connect.php');
$id = $_GET['id'];
$query = SELECT * FROM mypdfs WHERE id =$id;
$result= mysql_query($query) or die('Error, query failed');
if (!mysql_num_rows($result))
{
die(No matching records were found in the
On 3/8/07, Ross [EMAIL PROTECTED] wrote:
Can someone explain to me why this used to work but then stopped
header(Content-length: $size);
header(Content-type: $type);
header(Content-Disposition: attachment; filename=$name);
and this now works
header(Content-length: .$size);
On 3/8/07, Fabio Silva [EMAIL PROTECTED] wrote:
Hi all, i have a problem with this script... could anybody help me??
What is your problem? you are only posting your code here and whe have to
find the error?
What error comes up?
Tijnema
Regards,
titlePassword change/title/head
body
Hi Mikey,
OCI doesn't directly support the XMLtype so you need to convert to
string (if 4k) or clob before retrieving. Use:
select xml_metadata.getClobVal() ... OR
select xml_metadata.getStringVal() ...
If converting to clob, you get a clob object back and you'll need to run
the load() method
Any software that anyone is aware of for sending automated emails. I have
some email addresses in my database, now I am looking forward to send HTML
Formatted emails to those email address without having to pick up each email
address and send it.
I am using php on my site and cPanel is where I
Stut wrote:
Bruce Gilbert wrote:
Thanks for the responses so far.
This is what I have come up with
[php]
?php
for( $i=1; $i=100; $i++ )
{
echo $i;
echo br;
if ($i%3 == 0) echo Foo ;
elseif ($i%5 == 0) echo Bar;
}
?
[/php]
and the results can be seen here
Mikey wrote:
Roberto Mansfield wrote:
Hi Mikey,
OCI doesn't directly support the XMLtype so you need to convert to
string (if 4k) or clob before retrieving. Use:
select xml_metadata.getClobVal() ... OR
select xml_metadata.getStringVal() ...
If converting to clob, you get a clob object back
check PHPmailer..
very easy to use..
http://phpmailer.sourceforge.net/
Regards,
Rabih
On 3/8/07, Chris Carter [EMAIL PROTECTED] wrote:
Any software that anyone is aware of for sending automated emails. I have
some email addresses in my database, now I am looking forward to send HTML
Mikey wrote:
Roberto Mansfield wrote:
Hi Mikey,
OCI doesn't directly support the XMLtype so you need to convert to
string (if 4k) or clob before retrieving. Use:
select xml_metadata.getClobVal() ... OR
select xml_metadata.getStringVal() ...
If converting to clob, you get a clob object
Or just get all email addresses from the database, and run a loop.
Tijnema
On 3/8/07, Rabih Tayyem [EMAIL PROTECTED] wrote:
check PHPmailer..
very easy to use..
http://phpmailer.sourceforge.net/
Regards,
Rabih
On 3/8/07, Chris Carter [EMAIL PROTECTED] wrote:
Any software that
A while back I tried to use wddx as an XML serializer for PHP, and for
various reasons it didn't really work correctly. What I ended up having to
do was almost completely rewrite it, and what came out of that is XMLDBX.
Here is documentation
http://www.mohawksoft.org/?q=node/17
You can download
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\ type=\checkbox\ .../td
td.../td
}
so each checkbox field has its own name created from $key. Yet how can I
access these fields (names) later on?
foreach ($persons as $key =
Rob Gould wrote:
The problem I'm having is that the XML data that comes back from the
host doesn't just have eventname /eventname tags. It has f
n=eventnamedatahere/f tags, and I don't know how to get the XML
parser to read the values using that format. (And I don't have
control over the
Hi all,
I am using a linux server. When the php file below (uri.php) is run from the
command line I get the following error. Any ideas on what I could do
differently?
Thanks for any help,
Jonathan
../uri.php: line 1: syntax error near unexpected token `newline'
../uri.php: line 1: `html'
Your probably created it from a windows machine. Try converting the file
first with dos2unix
dos2unix ../uri.php
Tijnema
On 3/8/07, Jonathan Kahan [EMAIL PROTECTED] wrote:
Hi all,
I am using a linux server. When the php file below (uri.php) is run from
the
command line I get the following
Sorry if this is a duplicate post, I'm new to the listserve and I'm
not sure my first message made it through
I've been trying to retro-fit sample code found at : http://
www.sitepoint.com/article/php-xml-parsing-rss-1-0 to parse XML coming
from a server.
I'm sooo close to getting
Actuallyyou're doing it rightyou just need to concatenate.
ex:
echo tdinput *name=\K.$key.\* type=\checkbox\ .../td
and then later you access the values the same way...(you loop on $key and
the value would be K.$key)...
Regards,
Rabih
On 3/8/07, Otto Wyss [EMAIL PROTECTED] wrote:
I want to add some AJAX communication to my pages and would like to
know, what scripts, helpers you would recommend. I don't want to use a
full featured framework, just something to do the AJAX work. So far I've
come across the following solutions
http://prajax.sourceforge.net/
Unfortunately not. I used the vi editor within Linux to create the file. I am
using a windows machine locally but the server I am doing this all in is a
Linux server which I am accessing through putty.
- Original Message -
From: Tijnema !
To: Jonathan Kahan
Cc:
Roberto Mansfield wrote:
Mikey wrote:
Roberto Mansfield wrote:
Hi Mikey,
OCI doesn't directly support the XMLtype so you need to convert to
string (if 4k) or clob before retrieving. Use:
select xml_metadata.getClobVal() ... OR
select xml_metadata.getStringVal() ...
If converting to clob,
- Original Message -
From: Otto Wyss [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, March 08, 2007 5:56 PM
Subject: [PHP] Creating variable names from values
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\
'Better' is a little subjective and prone to generate a flame war, but I'll
risk my opinion. You might want to check Yahoo User Interface (YUI). The
Connection Manager at http://developer.yahoo.com/yui/connection/ provides
reliable cross-browser JavaScript code for the client side. You might
I never work with PHP from the commandline,. but i think it is not possible
to use HTML in a php file, so try replacing this:
html
body?php
with
?php
echo htmlbody;
and replace this:
?/body
/html
with this:
echo /body/html;
?
I think that will fix it.
Tijnema
On 3/8/07, Jonathan Kahan [EMAIL
Of course it's possible to output raw html in a php file, that's one of it's
fundamental uses! In fact, it's more efficient to switch the php parser off
and send raw html as the php parser doesn't need to get involved.
If you are running that from the command line, why do you need html? Not
sure why you're doing that.
Hi all,
Dave,
I am attempting to use html for learning purposes. My goal is to begin working
on a website.
Tijnema,
I tried the below and got the following errors. I can't imagine the error on
line 3 is a tag issue.
Jonathan
[EMAIL PROTECTED] cgi-bin]# ./uri.php
./uri.php: line 2: ?php:
I am not a linux expert but it might be because instead of running it like
php myprogram.php
you are just typing
myprogram.php
in which case, the file needs to have a comment in the first line telling
the shell which interpreter should handle it. Some
#!php
or something like that, not
AFAIK you can't run a php file directly, or you need to add #!/bin/php or
something to the first line, but you can run it with
php ../uri.php
but i suggest you to run it from a webserver like apache.
*if you don't have it, i can give you a few MB to try PHP out
Tijnema
On 3/8/07, Jonathan
Why not learn in a web environment if your goal is to build a website? Just
create the following file:
?php phpinfo(); ?
save it, upload it and view it. If you see the php details you have the
system set up as you need it and can just start writing php-driven web pages
(the file you are using
Otto Wyss wrote:
I want to add some AJAX communication to my pages and would like to
know, what scripts, helpers you would recommend. I don't want to use a
full featured framework, just something to do the AJAX work. So far I've
come across the following solutions
Otto Wyss wrote:
I want to add some AJAX communication to my pages and would like to
know, what scripts, helpers you would recommend. I don't want to use a
full featured framework, just something to do the AJAX work. So
far I've
come across the following solutions
im using http://www.prototypejs.org/ and have had no problems thus far.
- Original Message -
From: Mikey [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, March 08, 2007 10:02 AM
Subject: [PHP] Re: What sripts,helpers to use for AJAX
Otto Wyss wrote:
I want to add some
On 3/8/07 12:59 PM, Dave Goodchild wrote:
If you really want to run that on the command line, you will need the path
to php on the first line of the file.
Or, he can run it through the PHP CLI with:
$ php uri.php
Please, forget the command line stuff unless you want to write command line
Otto Wyss escreveu:
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\ type=\checkbox\ .../td
td.../td
}
so each checkbox field has its own name created from $key. Yet how can I
access these fields (names) later on?
foreach
Hi all,
I went to a website called php-cli.com and found that i needed to type
#!/usr/bin/php -q in the header line. Once I typed that, my script without the
HTML tags executed.
Thanks again,
Jonathan
- Original Message -
From: Tijnema !
To: Jonathan Kahan
Cc: Dave
He wanted to use it for the web, so why should he try it out on CL first?
I can offer a few MBs for everyone that wants to get learning PHP.
Tijnema
On 3/8/07, Ben Ramsey [EMAIL PROTECTED] wrote:
On 3/8/07 12:59 PM, Dave Goodchild wrote:
If you really want to run that on the command line,
On 3/8/07 1:44 PM, Tijnema ! wrote:
He wanted to use it for the web, so why should he try it out on CL first?
Because there are some advantages to being able to run something quickly
through the CLI without having to load it in a web browser. He was just
doing a simple test, so the PHP CLI
In news: [EMAIL PROTECTED],
Chris Carter said:
Any software that anyone is aware of for sending automated emails. I
have
some email addresses in my database, now I am looking forward to
send HTML
Formatted emails to those email address without having to pick up
each email
address and send
He wanted to use it for the web, so why should he try it out
on CL first?
I agree, though trying something out at the CLI may be his only option if he
doesn't have/want a webserver set up.
I can offer a few MBs for everyone that wants to get learning PHP.
Motherboards?
JM
--
PHP
Sorry, I didn't even think about that. I use many php files as shell
scripts... and u need this for any interpreter your using if you want to
execute the file directly from the command line, otherwise you would have to
type
php scriptname.php from the command line.
- Original Message
On 3/8/07, Otto Wyss [EMAIL PROTECTED] wrote:
Satyam wrote:
$key = 'K' . $key;
if ($$key) {
notice double dollar sign, it means, not the value of $key but the value
of
the variable $key says.
Thanks, any idea where this is described in the PHP manual? Searching
for $$ produces no
Tijnema ! wrote:
I can offer a few MBs for everyone that wants to get learning PHP.
Mariachi Bands! Yes, of course they can teach you how to PHP to the
music and Tequila!. :)
--
W | It's not a bug - it's an undocumented feature.
Rob Gould wrote:
Myron,
Thank you thank you! You've pointed me in the right direction - - - -
but I'm so new to PHP that I need just a little more pointing
From reading the docs, I understand that I need to pull from an
associative array, and you are correct that $venuecity =
Ok, well after fiddling around with PHP samples from the web for a
few hours, I'm shot. But I have a project due soon that relies on
this so I'm willing to pay someone:
I'll send $35 to someone via paypal who can create a PHP script that
will do the following:
1) Read XML data from an
On 3/8/07 2:59 PM, Rob Gould wrote:
1) Read XML data from an URL (www.librarytools.com/events/sampledata.txt)
2) Loop through all XML results and print to the screen the eventname
and eventnextoccurrencedate (Just the date) values
I'll probably kick myself once I see how easy it is, but I'm
On 3/8/07, Ben Ramsey [EMAIL PROTECTED] wrote:
On 3/8/07 2:59 PM, Rob Gould wrote:
1) Read XML data from an URL (
www.librarytools.com/events/sampledata.txt)
2) Loop through all XML results and print to the screen the eventname
and eventnextoccurrencedate (Just the date) values
I'll
Fabio Silva wrote:
Hi all, i have a problem with this script... could anybody help me??
Regards,
titlePassword change/title/head
body bgcolor=#ff
?php
//Written by Dave Edick on 6/22/99
// customize these variables for your install
$base_dn=ou=People;
$ldap_server=localhost;
Ok, well at least I'm honing in on the problems now. I appears that
my ISP is only running php 4.4.4.
So back in the PHP 4-days, what was the preferred method of doing
such things?
- Rob
On Mar 8, 2007, at 3:13 PM, Ben Ramsey wrote:
On 3/8/07 2:59 PM, Rob Gould wrote:
1) Read XML
Rob Gould wrote:
Ok, well at least I'm honing in on the problems now. I appears that
my ISP is only running php 4.4.4.
So back in the PHP 4-days, what was the preferred method of doing such
things?
- Rob
Expat would probably be the way to go, then.
http://www.php.net/xml
--
Jeremy C.
They are called 'variable variables':
http://www.php.net/manual/en/language.variables.variable.php and it is under
variables!
Satyam
PS: it sounds obvious once said, but it's usage might not be, so I meant the
pun, but not to tease you.
- Original Message -
From: Otto Wyss
Rob Gould wrote:
I'll send $35 to someone via paypal who can create a PHP script that
will do the following:
1) Read XML data from an URL (www.librarytools.com/events/sampledata.txt)
2) Loop through all XML results and print to the screen the eventname
and eventnextoccurrencedate (Just
On 3/8/07, Chris Shiflett [EMAIL PROTECTED] wrote:
Rob Gould wrote:
I'll send $35 to someone via paypal who can create a PHP script that
will do the following:
1) Read XML data from an URL (
www.librarytools.com/events/sampledata.txt)
2) Loop through all XML results and print to the
No one else having problems?
On 3/7/07, steve [EMAIL PROTECTED] wrote:
Hi,
I upgraded to PHP 4.4.6 and APC 3.0.13 at the same time. Every day at
some point, it starts having a problem and the load on that machine
styrockets.
It does not happen with the opcode cache in Zend Platform for PHP
hi, i install 4 IP cameras and i want to extract the images from their
web interface that is protected be a username and password (HTTP AUTH)
and show it into another system. so i do a function to connect to it
and get the image...
function subd($host,$port,$ownername,$passw,$request) {
$sock =
Otto Wyss wrote:
From an arry I create a table like
foreach ($persons as $key = $pers) {
echo tdinput name=\K$key\ type=\checkbox\ .../td
Maybe this?
... type=\K[{$key}]\ ...
td.../td
}
so each checkbox field has its own name created from $key. Yet how can I
access
Hey all,
I have the following code uploading and image to a
directory from a form, and it works great on
FireFox, but not IE 6.0.
Does anyone have an suggestions?
Thanks,
Skip
// get the image directory.
list($mats_img_path)=bsp_DB_row_fields(SELECT
mats_img_path FROM
Hey all.
Problem:
Class test {
var $foo = 0;
function __construct() {
$this-myfunc(foo, 1);
}
function myfunc($name, $val) {
$this-$name = $val;
}
}
Now, PHP correctly evaluates $this-$name as 0; i.e. the default property
value of $this-foo.
However,
Dave Goodchild wrote:
Of course it's possible to output raw html in a php file, that's one of
it's
fundamental uses! In fact, it's more efficient to switch the php parser off
and send raw html as the php parser doesn't need to get involved.
Just to point out, the last person did not say to
I don't know the details of your app, but you might want to reconsider a
resdesign.
Having said that, your code actually works for me. If I use your class as is,
foo is 1. That is:
$x = new test;
echo $x-foo;
outputs 1. Isn't that what you want?
Regards,
Bruce
PHP [EMAIL PROTECTED]
PHP wrote:
Problem:
Class test {
var $foo = 0;
function __construct() {
$this-myfunc(foo, 1);
}
function myfunc($name, $val) {
$this-$name = $val;
}
}
Now, PHP correctly evaluates $this-$name as 0; i.e. the default property
value of $this-foo.
However,
Sounds like a PHP version problem. PHP 4 will output 0 and PHP 5 will give
1. The constructor must be named the same as the class name in PHP 4 for
this to work.
You can have both constructors in your class so it will work in both
versions.
- Frank
I don't know the details of your app, but you
Myron Turner wrote:
Rob Gould wrote:
The problem I'm having is that the XML data that comes back from the
host doesn't just have eventname /eventname tags. It has f
n=eventnamedatahere/f tags, and I don't know how to get the XML
parser to read the values using that format. (And I don't
On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote:
No there is not, because an included file *executes* at the time it is
included and is then done. Any memory-resident objects (function/class
definitions, variables, etc.) that it defies then exist until you make
them
un-exist (with unset()
when i open up a url with fopen(), i get this error message:*
Warning*: fopen(http://sumurlhere.whatever/index.html) [function.fopen
http://127.0.0.1/bots2/function.fopen]: failed to open stream: A
connection attempt failed because the connected party did not properly
respond after a period
On Mar 8, 2007, at 5:30 AM, Delta Storm wrote:
Hi,
again me with the silly questions...
I need a script that will take data from MySQL database and display
one row each day.
I have googled, but with no luck.
The database retrieving mechanism is of course clear but I really dont
know how
On Mar 7, 2007, at 11:46 PM, Tijnema ! wrote:
Just a little side note, you said that firefox wasn't giving an error,
i think it does, but that it hides the error.
Open your page, and then go to Tools-javascript console.
There it will display all javascript errors. And gives a nice detailed
jekillen wrote:
On Mar 7, 2007, at 11:47 PM, Larry Garfield wrote:
No there is not, because an included file *executes* at the time it is
included and is then done. Any memory-resident objects (function/class
definitions, variables, etc.) that it defies then exist until you make
them
Myron Turner wrote:
Rob Gould wrote:
The problem I'm having is that the XML data that comes back from the
host doesn't just have eventname /eventname tags. It has f
n=eventnamedatahere/f tags, and I don't know how to get the XML
parser to read the values using that format. (And I don't
At 3/8/2007 05:30 AM, Delta Storm wrote:
I need a script that will take data from MySQL database and display
one row each day.
...
The database retrieving mechanism is of course clear but I really
dont know how to do a 24h delay before the next row is displayed.
Hi Delta,
You haven't
I have to say this is the most helpful listserve I've ever joined!
Such friendly people and such good information.
Well, the main thing I learned is - - - PHP 5 rocks, and PHP 4 semi-
rocks, but not enough to make XML-parsing enjoyable.
So, what I did was I installed MAMP on my Mac OS X
Hey all,
I'm very new to programming and PHP.
I want to pass instances of a class through an array, and then use a foreach
later to grab details of each class at once... but it returns a fatal error
Code:
$me = new Toon('Toon1','1')
$him = new Toon('Toon2','0')
$characterListing = array($me,
Fred wrote:
Hello What program whould i use to see a design view of php scripts not on a
server. Im running Windows XP Pro sp2. I thought Dreamweaver did but as i
was going to buy a friend told me it cant see design only the script.
PHP doesn't have a 'design view', your HTML controls that,
Jeff Taylor wrote:
Hey all,
I'm very new to programming and PHP.
I want to pass instances of a class through an array, and then use a foreach
later to grab details of each class at once... but it returns a fatal error
Code:
$me = new Toon('Toon1','1')
$him = new Toon('Toon2','0')
Hi,
Can you post your HTML code of the form used?
I don't really think the problem is in PHP, as it looks like a client side
problem, and PHP is server side
Tijnema
On 3/9/07, Skip Evans [EMAIL PROTECTED] wrote:
Hey all,
I have the following code uploading and image to a
directory
90 matches
Mail list logo