You want to add a new line every time your form is submittet, am I right?
Then you should open the file for appending, using fopen(filename, "a")
instead of "w"
"Ryan Holowaychuk" <[EMAIL PROTECTED]> wrote in message
news:!~!UENERkVCMDkAAQACABgAu5ugyx6+hUW5gsOu6grgVMKA
AAA
LOL
I like PHP, but I also like wet girlies. But the two are not interchangable,
which is a pitty, becouse sometimes I really could use a wet girl, and I
only have PHP
"Khalid El-Kary" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> sorry, but if PHP (a great piece of knowledg
Hello friends.
My records on one page are bout 200. So I wish to paginate them and show only about 20
records per page with the page numbers at the bottom of the records table and also the
"previous" and "next" links.
I mean, something line Google's searcg results page numbering system.
Can som
Hello,
DomXML is a large improvement over Sablot. If you take a close look at XML,
you'll see that XML is used effectively with some technologies : SAX (Simple
Api for XML), DOM (Document Object Modelling), XSL (Extensible styleshhet
language).
The DOMxml php extension (http://www.php.net/manual/e
Hello James,
Your vision is very similar to ours.
You should take the Krysalis platform (LGPL) and give it a try. It's a
mature solution (similar to cocoon) for XML/XSL publishing, and allows you
to define the way requests are served, define the way dynamic XML trees are
created and then define h
Enough answers, I think? If you want EACH value of $_POST on a new line,
then why not implode with \n instead of \t?
Now you get only one big line, because you only WRITE one \n.
Edwin
Ryan Holowaychuk wrote:
I am trying to save to a text file. And I have managed to do that part
now, but what
This one time, at band camp,
"Denis L. Menezes" <[EMAIL PROTECTED]> wrote:
> Hello friends.
> Can someone give me a link to some help files?
http://www.phpbuilder.com/columns/rod20001214.php3
Kevin
--
__
(_ \
_) )
John's solution is the better one. But if you really wish to stick to
your own, try and use eval() to complile $where$i.
Edwin
John W. Holmes wrote:
I have:
if ($where1 != '')
{
$whereArray = array_push($whereArray, $where1);
}
and I want to repeat for $where1 up to $where8
but ra
Hi all,
to quote from http://www.php.net/manual/en/function.ob-start.php
> void ob_start ( [string output_callback])
>
> An optional output_callback function may be specified. This function
> takes a string as a parameter and should return a string. The function
> will be called when ob_end_flu
I've got the following code:
$datum_beginn="2002-12-12";
$datensatz=odbc_exec($db_connection,"select * from Termin where Datumsfeld
>'#$datum_beginn#'");
I get an error message that data in creteria doesn't match. (free
translation)
The error def. lays in Datumsfeld >'#$datum_beginn#'. How do I
Query One: Can I use a member function of an object as an error_handler?
I currently declare a function for error handling with every page, but I
would like to put it in an object which lives in the session anyway. The
problem is I can't seem to do it; when I try to set the error handler to
a meth
Can anyone tell me why this doesn't work:
$db_object = pg_fetch_object($this->getLastResult());
In imaginary interactive mode, it works like this:
ME > echo $this->getLastResult();
PHP> Resource id #67
ME > echo $this->mr_lastResult;
PHP> Resource id #67
ME > echo pg_fetch_object($this->getLastR
James wrote:
LWP is a perl thing. Curl is probably the best thing to use.
Have you tried using googles php api which they provide free?
http://www.google.com/apis/
I had a look at the API, but I'm not sure if it's appropriate and easy
to use with PHP. It's still beta and might change again (or ma
I want to display the first 3 words of my record in
the my table and following is the code i'm using.
When i use the SQL Query in mySQL.. it works great..
but when i try to implement it in my php page.. i'm
not getting anything.. no error, no display, no
result.. just blank.. why?
Rahul S. Joha
At 13:37 9-3-2003, you wrote:
I want to display the first 3 words of my record in
the my table and following is the code i'm using.
When i use the SQL Query in mySQL.. it works great..
but when i try to implement it in my php page.. i'm
not getting anything.. no error, no display, no
result.. just
Ok i tried this.. and i didn't get any error listed..
so it seems that the mySQL Query is not failing in
syntax or logic.. but it's not picking up any rows.
Which is really stupid because i used my phpmyadmin
and i ran this SQL Query there and even then i got my
results..
--- Chris Hayes <[EMAIL
Hello,
"Rahul.Brenda" <[EMAIL PROTECTED]> wrote:
> Ok i tried this.. and i didn't get any error listed..
> so it seems that the mySQL Query is not failing in
> syntax or logic.. but it's not picking up any rows.
> Which is really stupid because i used my phpmyadmin
> and i ran this SQL Query ther
At 13:37 9-3-2003, you wrote:
if ($myrow = mysql_fetch_array($result)) {
do {
echo(" $myrow[title] ");
} while ($myrow = mysql_fetch_array($result));
}
PS same result with
while ($myrow = mysql_fetch_array($result));
{ echo $myrow['title'];
}
--
PHP General Mailing List (http://www.php.n
BRAVO!!!
Quoting Niels Andersen <[EMAIL PROTECTED]>:
### LOL
###
### I like PHP, but I also like wet girlies. But the two are not
### interchangable,
### which is a pitty, becouse sometimes I really could use a wet girl, and I
### only have PHP
###
###
###
### "Khalid El-Kary" <[EMAIL PRO
On Sun, 9 Mar 2003 04:37:47 -0800 (PST), Rahul.Brenda
<[EMAIL PROTECTED]> wrote:
I want to display the first 3 words of my record in
the my table and following is the code i'm using. When i use the SQL
Query in mySQL.. it works great..
but when i try to implement it in my php page.. i'm
not gett
Hi,
> So, you still have a "blank" page?
Yes i do actually, and blank in HTML Source too.
> do you have "display_errors = On" in your php.ini?
Ahan.. yes i do.
> to this:
>
> echo $myrow["title"];
>
> makes any difference.
No actually it didnt. :0(
Rahul S. Johari
_
Chris,
Thanks a lot.. THIS WORKS!
Works brilliantly. All other methods were just
failing. Thanks man.
> // fetch row is faster than fetch_assoc, which is
> faster than fetch_array
> // fetch_result might even be a better choice here,
> though, with only one
> item...
> if (!mysql_num_rows($resul
> I want to display the first 3 words of my record in
> the my table and following is the code i'm using.
> When i use the SQL Query in mySQL.. it works great..
> but when i try to implement it in my php page.. i'm
> not getting anything.. no error, no display, no
> result.. just blank.. why?
>
>
> I am creating a polling system. Its operation likes this:
> when the people vote the item, it updates the database by adding 1 for
the
> item automatically.
> The part of code is showed here:
>
> $colname_rsAddVote = "1";
> if (isset($HTTP_POST_VARS['Vote'])) {
> $colname_rsAddVote = (get_magic
> I need to stripslashes() practically every $value as I pass data from
one
> submit to another.
>
> L\'apprentissage d\'une langue ...
>
> Instead of doing it to every $value, someone showed me once something
I
> could add something to the beginning of my script. It was some type of
> code on a
The following problem seems to be hard to solve:
A PHP-Script reads in an HTML-File and removes linebreaks, tabs and not
needed spaces. After that the script should reconstruct the
table-structure this way (example):
...
This is a good article on pagination:
http://www.phpfreaks.com/tutorials/43/0.php
David Eisenhart
"Denis L. Menezes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello friends.
My records on one page are bout 200. So I wish to paginate them and show
only about 20 records per page
I'd recommend that you consider using the set_error_handler function.
This'll let you create and use your own custom error handler function (which
is fired for errors of the E_ERROR, E_WARNING and E_NOTICE type and also
those errors that you deliberately trigger using trigger_error()) - very
handy
On Mon, 2003-03-10 at 02:40, David Eisenhart wrote:
> I'd recommend that you consider using the set_error_handler function
Of course, this is what I am doing. My question is can I use a member
function of an object as an error handler? I don't seem to be able to,
but I might have overlooked someth
At 13:38 09.03.2003, Nik Makepeace said:
[snip]
>Can anyone tell me why this doesn't work:
>
>$db_object = pg_fetch_object($this->getLastResult());
>
>In imaginary interactive mode, it works like this:
>
>ME > echo $this->getLastResult();
>PHP> Resource id #6
> > I'd recommend that you consider using the set_error_handler function
>
> Of course, this is what I am doing. My question is can I use a member
> function of an object as an error handler? I don't seem to be able to,
> but I might have overlooked something.
Read the user notes on the manual pa
On Mon, 2003-03-10 at 03:01, Ernest E Vogelsinger wrote:
> At 13:38 09.03.2003, Nik Makepeace said:
> [snip]
> >Can anyone tell me why this doesn't work:
> >
> >$db_object = pg_fetch_object($this->getLastResult());
>
> pg_fetch_object() returns an object wit
Hello all,
When using forms, when do I have to worry about cleaning up user data? I
know to use escapeshellarg() when using system functions, but how about when
using the user data for database inserts? Also, if I do not insert the data
into the database or use any system commands, do I still n
php-general Digest 9 Mar 2003 19:19:02 - Issue 1928
Topics (messages 138838 through 138872):
Re: stripslashes()
138838 by: Leif K-Brooks
138864 by: John W. Holmes
A PHP UPDATE problem
138839 by: Terry Lau
138863 by: John W. Holmes
Re: save to file
13
I would really appreciate some advice from anyone who has worked with or
developed their own content management system.
This is my scenario, when i have finished creating a site, i want to be able
to add in the CMS with a minimum amount of fuss. I want to be able to get
the CMS to recognize all th
It all depends on what you will do with the data... The use will dictate
the level of cleaning up.
You MUST clean it up for DB entries as you mentioned, but if you are
only going to e-mail the contents "as-is" to yourself etc, then cleaning
up the data becomes of lesser importance.
On Sun, 2003-03
I've got a multi-table query, (pulling from both an orders and an orders_products
(line items) file), and I'd like to group the output to help reduce multiple
appearances of of the product skus.
The query:
select
orders.orders_id,orders.date_purchased,orders.customers_name,orders_products.prod
> When using forms, when do I have to worry about cleaning up user data?
I
> know to use escapeshellarg() when using system functions, but how
about
> when
> using the user data for database inserts? Also, if I do not insert the
> data
> into the database or use any system commands, do I still need
On Sun, 9 Mar 2003 14:56:31 -0500
Kelly Meeks <[EMAIL PROTECTED]> wrote:
> Order Num Order Date Product CodeProduct Name
> ---
> 1 2003-01-01 1
Today I collect information from several forms and store it in a cookie:
function formCookie() {
var cookieValue = document.$formName.totalAns.value+'|';
cookieValue
+=document.form1.correct.value+'$test[1]'+document.form1.question1.value+doc
ument.form1.answer.value+'|';
cookieValue
+=document
On Sun, 9 Mar 2003 21:18:33 +0100
"Øystein Håland" <[EMAIL PROTECTED]> wrote:
> The problem is the cookie soon reaches the 4 kb limit, so I would like to
> achieve the same using session. The trouble is, I don't know how to do. I
> would appreciate any help that brings me closer to a solution on t
Today I collect information from several forms and store it in a javascript
cookie:
function formCookie() {
var cookieValue = document.$formName.totalAns.value+'|';
cookieValue+=document.form1.correct.value+'$test[1]'+document.form1.question
1.value+document.form1.answer.value+'|';
cookieValue+
Hello,
Is there an easy way to change an integer to a 5 caracters string.
For example:
$i = 3 ;
$j = 110 ;
After having changed them:
$i = "3" ;
$j = "00110" ;
Is there a php function to do so instead of doing this:
if( ($i>0)&&($i<10)) {
$i = "".$i ;
} else if( ($i>9)&
Hi,
I have a php script which does some stuff and at the end of the file I have
it include a file which has a form in it. The problem I am having is that it
is missing code. If you go down to the second input - it has a value="0"
field - this does not show up when I view the source from my browse
Hello,
Use str_pad, the manual page is available at http://www.php.net/str_pad,
a short example would be:
$i = 3;
$i = str_pad($i, 5, "0", STR_PAD_LEFT);
This function is described in the PHP manual in the string functions
section, the manual is an excellent place to go first when questions
such
You're looking for the str_pad function.
http://www.php.net/str_pad
$i = 3;
$i = str_pad($i, 5, '0', STR_PAD_LEFT);
echo $i; // outputs '3'
Just keep in mind that it won't help you if your input is greater than 5
to begin with, you'll have to check that seperately.
$j = 123456;
$j = str_pad
Jason Sheets wrote:
Hello,
Use str_pad, the manual page is available at http://www.php.net/str_pad,
a short example would be:
$i = 3;
$i = str_pad($i, 5, "0", STR_PAD_LEFT);
This function is described in the PHP manual in the string functions
section, the manual is an excellent place to go first w
At 22:23 9-3-2003, you wrote:
You're looking for the str_pad function.
http://www.php.net/str_pad
$i = 3;
$i = str_pad($i, 5, '0', STR_PAD_LEFT);
echo $i; // outputs '3'
Just keep in mind that it won't help you if your input is greater than 5
to begin with, you'll have to check that seperately
At 22:15 9-3-2003, you wrote:
Hi,
I have a php script which does some stuff and at the end of the file I have
it include a file which has a form in it. The problem I am having is that it
is missing code. If you go down to the second input - it has a value="0"
field - this does not show up when I
Why is it the following code produces nothing?
$responsesubmitted = FALSE;
print($responsesubmitted);
I have an if statement that says if($responsesubmitted), but it doesn't work.
At 23:37 09.03.2003, Liam Gibbs said:
[snip]
>Why is it the following code produces nothing?
>
>$responsesubmitted = FALSE;
>print($responsesubmitted);
>
>I have an if statement that says if($responsesubmitted), but it doesn't work.
[snip]
If anyone has come across a similar problem to the one described below, and
has a solution I'd be really grateful if you can help me out.
I'm trying to implement a user authentication process where users can click
on an external link to my site. If they're not logged in they get presented
with a l
I have seen this as well. Try using netscape or an earlier version of IE
and you will probably find it will work without issue. I posted about this
many moons ago and unfortunately didn't get a solution. I can't recall the
specifics of when it was doing it (and if I remember correctly, sometimes
Hi Steve,
Just out of curiosity, when you mention "implement a user authentication
process where users can click on an external link to my site" are you using
the https protocol?
I had similar bizarre behavior with IE using a "Confirmation Required'
script. Worked great at home (localhost), wi
On March 9, 2003 12:49 pm, Steve Pollard wrote:
> If anyone has come across a similar problem to the one described
> below, and has a solution I'd be really grateful if you can help me
> out.
>
> I'm trying to implement a user authentication process where users
> can click on an external link to my
Sorry, the line I was actually referring to is the one below. I forgot the
hidden one was even there and serves no purpose and does not resolve the
problem by removing it.
This works:
It also works if I just hardcode a value (value="Bob")
This doesn't:
They are both exactly the same other t
In my case, it was a https website. However, in testing, it was happening
on a normal http website as well. It was something I ruled out trying to
find the problem.
Best Regards
Bob Irwin
Server Admin & Web Programmer
Planet Netcom
- Original Message -
From: "Andre Dubuc" <[EMAIL PROTECT
--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
Friends are like stars
You can't allways see them,
but they are always there.
--
Websites:
PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]
Philip's Domain // Internet Proje
I have a customer who's webhost upgraded their server recently and a script
that was working fine quit working. The error they are getting is this
"fgetcsv(): supplied argument is not a valid stream resource". I don't
know what they did with Apache, but as far as I know, nothing else changed.
Check to make sure the file exists, you should probably through some
debug code around the area that is failing.
Jason
On Sun, 2003-03-09 at 18:50, CDitty wrote:
> I have a customer who's webhost upgraded their server recently and a script
> that was working fine quit working. The error they are
HI, I'm looking to take the data from a CSV file, then upload it into a
mysql databace.
I figure i will need the following.
To count the number of lines ... and cut up each line in its veriables then
entering it into the databace.
I have:
$file = fopen("pricelist-snippet.csv","r");
$buffer = fr
I thought about this possibility, but it turns out 4 different scripts on
the same server accessing different files from different locations and
using different methods are all failing.
Chris
At 07:53 PM 3/9/2003, Jason Sheets wrote:
Check to make sure the file exists, you should probably throu
I want to display a file under program control in the same manner as one
would with using an >a> tag e.g.
Click here to open the Race Schedule
In other words, if certain conditions are met, then I want to display
the file. What is the best way to do that?
Many thanks.
Todd
--
Ariste Soft
hi mark!
i import data all the dang time and this is what i use (more or less)
Insert($query); // i use a class for my mysql connections
}
function csv_parse($data, $separator)
{
$quote = '"';
$values = array();
$toggle = 0;
$len = strlen($data);
$count =
I would use something like this (assuming you're just going to read the
entire file and bung it into the database).
Be careful reading large files in, it can fill up PHP's allocated memory
resource. I've used this with 4 meg files though, and its worked ok.
$fp = file("yourfile.txt");
//This re
Change your link to something like:
...
view.php will NOT be a "HTML page" -- it will be responsible for:
a) some conditional stuff, like checking for a logged in user
b) output an appropriate header for the file type
c) pass through the actual file contents
You would actually want to store
On that note, how would i load an image from outside the document root?
- Original Message -
From: "Justin French" <[EMAIL PROTECTED]>
To: "Todd Cary" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, March 10, 2003 4:06 PM
Subject: Re: [PHP] Displaying a file
> Change your link t
Same way
image.php would do simular things to what view.php does in the script below.
Justin
on 10/03/03 2:07 PM, Mark Tehara ([EMAIL PROTECTED]) wrote:
> On that note, how would i load an image from outside the document root?
>
>
>
> - Original Message -
> From: "Justin French" <
On March 9, 2003 04:30 pm, Beauford.2002 wrote:
> Sorry, the line I was actually referring to is the one below. I
> forgot the hidden one was even there and serves no purpose and does
> not resolve the problem by removing it.
>
> This works:
> It also works if I just hardcode a value (value="Bob"
I don't know whether this is a MySQL or PHP quesiton.
$SQL = "SELECT * FROM table ORDER BY id asc LIMIT $autoindex -5 ,5;";
I would like to get the autoindex value of my table and use it in my SQL. Can I get
the autoindex? :) How?
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
OK! This makes sense. What is the syntax to do
b) output an appropriate header for the file type
c) pass through the actual file contents
if I were doing an HTML file - if I were doing a PDF file?
Todd
Justin French wrote:
Same way
image.php would do simular things to what view.php does
If i was to use PHP to call all my images from out side the wwwroot, dose
anyone have a method that they use?
--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]
+64 (9) 576 9491
+64 021-048-3999
--
Friends are like stars
You can't allways see them,
but they are always there.
--
W
Anyone know how to get the auto_increment $value out of a mysql table.
I'm thinking it is in mysql_fetch_array but don't see how to get it.
> $SQL = "SELECT * FROM table ORDER BY id asc LIMIT $autoindex -5 ,5;";
>
> I would like to get the autoindex value of my table and use it in my SQL. Can I
Todd Cary <[EMAIL PROTECTED]> wrote:
> OK! This makes sense. What is the syntax to do
Hmm, did you read (and try) the article mentioned earlier?
- E
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
--
PHP General Mai
"Philip J. Newman" <[EMAIL PROTECTED]> wrote:
> If i was to use PHP to call all my images from out side the
> wwwroot, dose anyone have a method that they use?
By using an absolute path?
- E
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo! htt
Hello,
John Taylor-Johnston <[EMAIL PROTECTED]> wrote:
> Anyone know how to get the auto_increment $value out of a mysql
> table.
> I'm thinking it is in mysql_fetch_array but don't see how to
> get it.
What do you exactly mean by "get the auto_increment $value"?
Perhaps, you're looking for t
$news = mysql_query("SHOW TABLE STATUS FROM ".$db2." LIKE '$table2'");
while ($table_status = mysql_fetch_array($news))
{
$autoindex = $table_status['Auto_increment'];
}
Got it. Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/un
Hi,
Thanks.. i went through your reply and certainly now i
understand the mistake i was making. Quite logical
actually, that i hadn't actually selected the "title"
column. But i'm sure i wouldnt' have been able to
figure this out myself.
And surely, i too try to stay away from Numerical
Indexes.
I'll have a look at that too. Thanks!
What do you make of this: My browser is all snuffed up! It dodnint wwork aniwore!
http://ccl.flsh.usherbrooke.ca/tools/
Choose Greid. Works ok.
Choose JDaxell and the stops working after 184.
Even with:
Too much HTML or too much in one . I'll have to ge
How do I convert the unix time stamp (the one I get by the time()) to a
readable English language time
I am getting data from mySQL by the "now()" function
Please Help
Thank You.
Lord Loh.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/uns
Hi Kelvin,
You can use both PERL and PHP (prefered :-)).
You need to download, compile and install FreeTDS (http://freetds.org). If
you are using PHP you need to recompile it using --with-mssql. This will
enable the mssql extension. You can then create a php script to read the
text file, parse it
on 10/03/03 3:40 PM, Todd Cary ([EMAIL PROTECTED]) wrote:
> OK! This makes sense. What is the syntax to do
>
> b) output an appropriate header for the file type
> c) pass through the actual file contents
>
> if I were doing an HTML file - if I were doing a PDF file?
*Slaps forehead loudly*
Hi Kelvin,
You can use both PERL and PHP (prefered :-)).
You need to download, compile and install FreeTDS (http://freetds.org). If
you are using PHP you need to recompile it using --with-mssql. This will
enable the mssql extension. You can then create a php script to read the
text file, parse it
I'm having problems figuring this out. This first way gives me a 'Fatal
Error: Cannot use [] for reading in class.php on line xx'
class myClass
{
var $arr = array();
function add_something( $value )
{
$this->$arr[] = $value; // this is the line causing the error
}
}
I've
You can't do it from java script...
See the php docs...there are good examples too.
Hope this helps.
Lord Loh.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> I'm having problems figuring this out. This first way gives me a
'Fatal
> Error: Cannot use [] for reading in class.php on line xx'
>
> class myClass
> {
>var $arr = array();
>
>function add_something( $value )
>{
> $this->$arr[] = $value; // this is the line causing the
php-general Digest 10 Mar 2003 07:30:17 - Issue 1929
Topics (messages 138873 through 138924):
Content Management Systems
138873 by: shaun
Re: Form input security
138874 by: Petre Agenbag
138876 by: John W. Holmes
php/mysql grouping output
138875 by: Kelly Me
PHP
look at the Date( ) Function at php.net
http://us2.php.net/manual/en/function.date.php
Joel
"Lord Loh." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> How do I convert the unix time stamp (the one I get by the time()) to a
> readable English language time
>
> I am get
> How do I convert the unix time stamp (the one I get by the time()) to
a
> readable English language time
>
> I am getting data from mySQL by the "now()" function
Unix timestamps in PHP and the result of NOW() in MySQL are totally
different.
You'd use the date() function in PHP to form
On Monday 10 March 2003 14:34, Lord Loh. wrote:
> How do I convert the unix time stamp (the one I get by the time()) to a
> readable English language time
>
> I am getting data from mySQL by the "now()" function
strftime()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Sou
90 matches
Mail list logo