?
Currently the command I have is
print $row['open'];
Well the easiest thing is to let MySQL do the work
use following SELECT
SELECT DATE_FORMAT(your_date_field,'%m-%d-%Y') as date_field FROM yourtable
That should do the work...
--
Johan Holst Nielsen
Freelance PHP Developer - http://phpgeek.dk
server. It can be whereever on the
server. It depends on the configuration of the FTP server ;)
--
Johan Holst Nielsen
Freelance PHP Developer - http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
with that :)
www.php.net/curl
--
Johan Holst Nielsen
Freelance PHP Developer - http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Im doing some dynamic image creation with GD library - and I really
wonder why I can't get the last character printed out on the image :(
I use this file to encode the font:
http://phpgeek.dk/ng/88592.enc.txt
And the font I use is Frutiger CE 45 Light...
I wonder if it is the font that are
Johan Holst Nielsen wrote:
Any one tried such problems? Any solution for that? And is it the font,
the encoding file - or something else that are wrong?
Okay, I found the solution :)
I was the encoding file that was wrong...
The /dbar should be replaced with /dcroat
Now everything works
Alex Hogan wrote:
When I'm using the time() function am I getting the time on the server?
If not how can I get the time from the server regardless of whether or
not its in the same time zone as the client.
Use the gmdate() function.
http://php.net/manual/en/function.gmdate.php
--
Johan Holst
if the DocumentRoot is right in your httpd.conf - it should be
the same as the location where phpinfo.php is located.
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
('htmfile.html');
?
Check the documentation http://php.net/include - include returns 1 -
thats why it is printed out when you do echo :)
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
: includeFile.php
?php
$foo = Test with return;
return $foo;
?
?php
$bar = include(includeFile.php);
echo $bar; //Output Test with return
?
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
- or use
a database :)
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of age.
Is there a way to do this?
No sure what you mean... but it is possible this way:
?php
foreach($myFriendsAges as $name=$age) {
echo My friend .$name. is .$age. years of age.br\n;
}
?
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http
='$mod_dataset';
What does mysql_error() says?
Tried to print out the query and execute it directly in the mysql prompt
or phpmyadmin? What happens then?
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Lists wrote:
tortoise is nice
http://www.tortoisecvs.org/
As far as I can see, it have nothing to do with an web frontend?
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
browser...
Anyway - thanks for the link to tcvs :D I have downloaded it and I like
it :D
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
When sending variables this is the normal way to do it:
/foo.php?id=12
But I have read that the following URL should work:
/foo.php/12/
and then fetch the id in this way:
$id = ereg_replace('[^0-9]', '', $PATH_INFO);
I have even seen it in function but the problem is that I can't get
Hi people...
Anyone know a class or a solution so I can find the DPI (dot per inch)
of an image?
getImageSize do not help me? Any other solutions?
Regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Neil Freeman wrote:
mysql_db_query has been depreciated since PHP 4.0.6
Yep.. but thats not the only different...
mysql_db_query() have an extra parameter that is what Database you want
to execute your query in...
mysql_query() just use the database you have selected with f.ex.
?php
//DATEFORMAT MMDD
if($dir=@opendir(/yourdirwithpdf)) {
echo Found following files:
while(($file=readdir($dir))!==false) {
if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) {
echo 'a href='.$file.''.$file.'\n';
}
}
}
?
UPS
if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf,
Johan Holst Nielsen wrote:
?php
//DATEFORMAT MMDD
if($dir=@opendir(/yourdirwithpdf)) {
echo Found following files:
while(($file=readdir($dir))!==false) {
if(ereg(^[a-zA-Z0-9]+\.$INPUTDATE\.pdf)) {
echo 'a href='.$file.''.$file.'\n';
}
}
}
?
UPS
if(ereg
Jack wrote:
Dear all
I had a folder which contains a lot of pdf file, the name format of the pdf
files are : x.dateformat.pdf (eg : abcdefg.20020718.pdf).
Now i want to use the php script to detect what files it got in a specific
folder.
i want to make a user input form which will let
Justin French wrote:
try add_slashes($string) before inserting into the database, or turn on
magic quotes in php.ini
Or
Mysql_Escape_String()
http://www.php.net/manual/en/function.mysql-escape-string.php
Or
Mysql_Real_Escape_String()
Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back
Next). The buttons should be images. How can I make php see, which
button has been pressed?
?php
if(isset($_POST[submit_back])) {
//go back
}
else {
//go forward
}
?
form action=?=$_SERVER[PHP_SELF]?
Johan Holst Nielsen wrote:
Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back
Next). The buttons should be images. How can I make php see, which
button has been pressed?
?php
if(isset($_POST[submit_back])) {
//go back
}
else {
//go forward
Rw wrote:
I have been trying this to no avail.
Tryng to say the equivalent of:
IF (var1 = 1 AND var2 = a or b or c)
i.e. yield true if 1 and a
OR
1 and b
OR 1 and c
I would do something like this:
$CheckArr = array(a, b, c);
if($var1 == 1 in_array($CheckArr, $var2)) {
.
}
Hi,
Anyone know how long the developers is from a finale release that
support Apache 2?
Please advice!
Regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
(yes it's me again)
i've got an other problem.
i've got an login system, and it has to put an cookie, but it seems he
doesn't do it.
is it an php.ini problem ??
Dont think it a php.ini file.
First of all. Remember to set the cookie before any other headers is
sent to the browser.
Do you
it's not the browser or what so ever,
i installed php 4.2.1. with apache 1.3.24 on a Redhat 7.1 server.
but becuas for some kind a reason it wont work :(
any body got an idea ??
try to get the cookie witgh
$_COOKIE[cookiename];
if you have register_globals = off!
Regards,
Johan
Do you remember to reload the page after the cookie is sent? (some
browser cant see the cookie at the page it sent but first after it
have been reloaded!).
Actualy this is not browser issue but PHP issue
Aah, sorry... but it doesn't matter in this case, it could be one of the
errors?
my cookie problem is still not solved :(
my browser settings are correct, and the script has worked.
but sins i now installed php 4.2.1 with apache 1.3.24 it doesn't work :(
does any one have an solution ??
thnx in advance,
Sure about your register_globals = off?
please show us the
($OutputArray); //Print out the array, to check the values!
?
Please reply if this doesn't work?
By the way... if you got further problems, please tell us which version of
PHP you use.
Regards,
Johan Holst Nielsen
www.weknowthewayout.com
--
PHP General Mailing List (http://www.php.net
Kirk Johnson wrote:
The coding style needs to match the register_globals setting in php.ini.
register_globals on:
$accountsession = $session;
$accountemail = $email;
session_register(accountsession);
session_register(accountemail);
Oh, sorry... I have just tried so many ways... but
the sessions.
session_start();
echo
Email:.$HTTP_SESSION_VARS[accountemail].br.$HTTP_SESSION_VARS[accountsession];
But i just get a Email: without any content?
Please help me? Someone know whats wrong?
Best Regards,
Johan Holst Nielsen
--
PHP General Mailing List (http://www.php.net
How can I make the following work:
function start($times)
{
for...loop starts here...
{ -- notice only one bracket.
}
function end()
{
} -- the ending bracket.
}
start('10');
html-code... I want this to be repeated 10 times.
end();
Try
Hi,
I just have some few question. I hope you can help me, with some links
or some information :o)
I've to create some pdf files, but the problem is that it have to be
printed later. So it have to be in i quality about 304 dpi.
I dont know a lot about PDF. Can anyone help me please? Send me
of these images would affect your output.
And PHP is fine for generating PDF with. See http://php.net/pdf
-Rasmus
On Tue, 11 Dec 2001, Johan Holst Nielsen wrote:
Hi,
I just have some few question. I hope you can help me, with some links
or some information :o)
I've to create some pdf files
Original Message
From: - Fri Dec 07 14:52:01 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2:
Message-ID: [EMAIL PROTECTED]
Date: Fri, 07 Dec 2001 14:51:56 +0100
From: Johan Holst Nielsen [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
Organization: 1WAY2PRINT A/S
User
Hi
Anyone know a good PHP application that generate statistic from apachelog?
Please send me an URL.
Regards,
Johan
--
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
Message -
From: Johan Holst Nielsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 04, 2001 10:51 AM
Subject: [PHP] Statistic analyze for Apache log
Hi
Anyone know a good PHP application that generate statistic from apachelog?
Please send me an URL.
Regards,
Johan
--
PHP
If you find this out off list could you let me know as well. I can only find C++ and
Perl
scripts.
Ok, thinking about programming if it don't exists.
So I let you know when it's ready :o)
Regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
sorry for taking your time, but I still dont understand why I got errors with
pjeg...
I use the following code on other machine with jpeg support to , and it works,
while in my machine I got an empty jpeg file
?
Header(Content-type: image/jpeg);
$im=ImageCreate(400,200);
$bcg =
Want to send mail through PHP script such that
the receiver of that mail should not contain FROM
header.
I used mail() function with empty FROM header and
even without FROM header, but the receiver is still
getting FROM address as [EMAIL PROTECTED]
You can't. The mail specification
available, send email with subject: Send PGP Key
- Original Message -
From: Chamarty Prasanna Kumar [EMAIL PROTECTED]
To: Johan Holst Nielsen [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 10:54 AM
Subject: Re: Re: [PHP] URGENT-HELP !!
Thanks very much
I am talking about the final SMTP host.. it will do a reverse lookup on the
From: domain and if it dont resolve to the IP of the sending STMP host it
will reject it.
yes I know. But it the final SMTP tries to resolve the host (localhost)
it will get a response from it self? I haven't tried
$result=@mysql_query($qry,$connection);
Try make a line after this:
echo mysql_errno().: .mysql_error();
What is the output?
Regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
i want php to do an IF, when he founds a special word in a string (ex:
text_-_write_-_text ) .. i m not able to manage it ..
?php
function doThis($x) {
//something?
$result = $x. phplover;
return $result;
}
$string = Hi whats your name? Hi whats your name?;
$string_arr = explode( ,
Ok, where can I find a tutorial about sending mail using fsockopen ?
***
http://www.phpbuilder.com/columns/tim19990221.php3
Regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To
Richard S. Crawford wrote:
Not quite. I have the same problem.
I tried at test on my localhost. Following works for me:
$string = htmlheadtitleSometime i dont wanna
know/title/headbody/body/html;
if(eregi(title(.+)/title, $string, $arr)) {
echo Title: .$arr[1];
}
else {
echo unknown
the program just can let me get the post string like my example
I want post the xml file content to a php file, then I want get the post
string that it's xml content.
hehe, thanks for your help
Did you solve your problem?
I dont think i understand you, but i tries to give a little
I think you understand my problem.
I will use a client program to POST the XML data to a php file on the
server base HTTP
in php file will get the post request,
the question is, how can i get the xml data in post request
Hmm, I dont think I understand? Where do you want to do with the
I know it's probabally overkill but in the configure messages, it says
yes for everything gd, jpeg, png, and zlib. Any suggestions? If anybody
wants to see the configure messages let me know.
What do PHP tells you about the GD lib extension.
Try making a phpinfo() file and send the output in
Header(Content-type: image/jpeg);
echo $Images;
I can't figure out how to create the header. There's lots of examples
of how to do the above, but I have yet to stumble across an example
which allows you to write the header into a file
You could make a PHP script that generate the
This is really a combination html/php question, I believe. The problem is
that I have a table that displays a field of text that can be several
hundred bytes long. If, however, someone holds down a key and produces
500
letter 'x' the table data then distorts the table! Since the length of
Start at index.html. It goes to postcard.php. When I click on submit in
postcard.php, if I change any of the values in the form, the session
values received in send_mail.php do not change. Anyone have an idea what
I have done wrong now?
Try to make a session_unregister(), and make
$mailheaders = From: \Do Not Reply\\r\nReply-To: Do Not Reply@Do Not
Reply\n;
If I use the above headers it says from Do Not [EMAIL PROTECTED]
Does anyone know how to make it just say Do Not Reply?
You cant... but try making it like this:
$mailheaders = FROM: Do Not Reply
After I research security issue from the web, I had found apache
.htaccess which can solve
my problem. What my problem is that, can .htaccess perform like a database
system which
can store users loginID and password, and also set those users have a
expired time each ??
If you want to
then, can .htaccess store the user expried date ?
like Peter is not allowed to login after 2Feb 2001, Sam is expired after
11Nov 2002..
Yes and no. You just have to make a change in the .htaccess file.
and also, is it possible to maintain the .htaccess automatically ?
like I write a
Richard S. Crawford wrote:
I am trying to get the title of an html file... you know, the string
between the title and /title tags...
Here is the function I've got so far:
function fileTitle($fileName) {
$myFile = fopen($fileName, r);
$myText=;
while
I mean post content string not a lot of variables
etc:
aaa.html post a=1b=2 to bbb.php
I want use php to read the string a=1b=2 not $a and $b
I not sure I understand you, but are you looking for
$HTTP_SERVER_VARS['QUERY_STRING'] ??
Regards,
Johan
--
PHP General Mailing List
$HTTP_SERVER_VARS['QUERY_STRING'] -- it just can read the content by GET
method.
I want POST content
Ah okay. Try this:
$post_query = ;
$keys_arr = array_keys($HTTP_POST_VARS);
$keys_size = sizeof($key_arr);
for($i=0; $i$keys_size; $i++) {
if($i == 0) {
$post_query .=
Hi
Do anyone know, how i define the width, height etc. parameters in PDFlib
functions in PHP? Is it in cm, pixels, inch? Or?
Anyone know?
I need to generate printingfiles, so I hope I can use cm or sometime like
that :o)
Regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To
We're running suse 7.1 and apache on the server
containing the information, and the problem is I don't know
how to make
linux run the php script, or how to set up crobtab with the php
script in
mind. anyone have any ideas?
You can use this Tutorial
try etc.
00,30 * * * * lynx -dump http://path.to.php.script /dev/null
Regards
Johan
Hi
I have PHP installed as Apache module but I want to run a cron job. I
have .php script that works OK when executed through browser but is there
any way I could execute it through a cron job.
Ajdin
Anyone know when and
how you can sign upfor the conference in Franfurt (5-7 Nov
2001)?
Can't find any
information at there website, someone who can help me?! :o)
Regards
Johan
Anyone know when and
how you can sign upfor the conference in Franfurt (5-7 Nov
2001)?
Can't find any
information at there website, someone who can help me?! :o)
Regards
Johan
Hi
I have a problem with GD library. Then I write some text with the GD library
TTF function I get a very unreadable text :o(
The problem comes then the font is in size 9 and under!
Some know how to solve this problem?
/Johan
--
PHP General Mailing List (http://www.php.net/)
To
sorry if this has been covered before. I am not sure if this makes a
difference but I see in some books echo written as:
echo ("Hello");
and in others just:
echo "Hello";
Do the brackets make a difference.
Hmmm, nope. You can also write print "Hello"; or print("Hello");
/Johan
--
PHP
How do I round up a lot of decimal number like 10.232656898 to be 10.23 ?
Should I use this?
$num = 10.26564787;
$Rnum = round($num);
What would be the function I am looking for and how?
Try:
$num = 10.26564787;
$Rnum = round($num, 2);
/Johan
--
PHP General Mailing List
I have a hosting account that provides PHP, but it hasn't been compiled
with
the IMAP libraries, and I really need these functions. Is there any way to
link the IMAP lib locally (ie: without root permissions)? I've used Perl
before and know that similar is possible.
No, you have to compile PHP
68 matches
Mail list logo