?
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
ical) the root of the ftp 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
p you 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
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
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 :)
Is
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 bu
Check 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
ffice_phone='$office', fax_phone='$fax', email='$email' WHERE
company_name='$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
ing like:
My friend Bill is 35 years of age.
Is there a way to do this?
No sure what you mean... but it is possible this way:
$age) {
echo "My friend ".$name." is ".$age." years of age.\n";
}
?>
--
Johan Holst Nielsen
Freelance PHP Developer
http://phpgeek.dk
--
P
- 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
: includeFile.php
--
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
l :)
just
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
ink 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
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
> 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
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.
mysql_s
Johan Holst Nielsen wrote:
>> > //DATEFORMAT MMDD
>> if($dir=@opendir("/yourdirwithpdf")) {
>> echo "Found following files:"
>> while(($file=readdir($dir))!==false) {
>> if(ereg("^[a-z
> //DATEFORMAT MMDD
> if($dir=@opendir("/yourdirwithpdf")) {
> echo "Found following files:"
> while(($file=readdir($dir))!==false) {
> if(ereg("^[a-zA-Z0-9]+\.$INPUTDATE\.pdf")) {
> echo ''.$file.'<\n>';
> }
> }
> }
> ?>
UPS
if(ereg("^[a-zA-Z0-9]+\.$INPUTDATE\.pdf", $fi
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 wil
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()
http://www.php.net/manual/en/function.mysql-real-escape-
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?
>
>
>
> if(isset($_POST["submit_back"]
> 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?
" method="post">
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.p
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($CheckA
> 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 so
>> 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
> 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,
J
> (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
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
le to natsort the
> values and display in the selection form box.
Well lets try
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/)
To unsubscribe, visit: http://www.php.net/unsub.php
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 way
uery!!
And this works fine!
The mainpage tries to get the sessions.
session_start();
echo
"Email:".$HTTP_SESSION_VARS["accountemail"]."".$HTTP_SESSION_VARS["accountsession"];
But i just get a "Email:" without any content?
Please help me
>
>
>
>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.
>e
pi 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
>
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 s
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: 1W
>
>
>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 = Imag
>
>
>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: [EMAI
s,
>Manu
>
>
>- Original 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
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 administrator
>
>
>
>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 t
enta.net
>Tel 01952 428969 Mob 07763 620378
>PGP Key available, send email with subject: Send PGP Key
>
>
>- Original Message -----
>From: "Chamarty Prasanna Kumar" <[EMAIL PROTECTED]>
>To: "Johan Holst Nielsen" <[EMAIL PROTECTED]&g
>
>
>
> 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
>
>
>$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]
> 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 ..
Could you use this example?
Regards,
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-m
> 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 co
> 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
> 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
> 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 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 s
Richard S. Crawford wrote:
> Not quite. I have the same problem.
I tried at test on my localhost. Following works for me:
$string = "Sometime i dont wanna
know";
if(eregi("(.+)", $string, $arr)) {
echo "Title: ".$arr[1];
}
else {
echo "unknown title";
}
This works for me?
Regards,
Jo
> $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 .= $
> I mean post content string not a lot of variables
>
> etc:
>
> aaa.html post a=1&b=2 to bbb.php
>
> I want use php to read the string a=1&b=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
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="";
>
> 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
> 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
> $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 Repl
> 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 sess
> 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 lengt
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/)
> i would like to know if there is an official logo for php4 that i
> can put on
> my company website, to show that we support and develop applications using
> php4.
Ypou can use one of these:
http://www.php.net/download-logos.php
regards,
Johan
--
PHP General Mailing List (http://www.php.ne
> I installed Apache 1.3 for windows and php4 (Easywindows).
> I take a sample of functions GD, but when the program execute don't appear
> nothing.
>
> What's the problem?
hmm, did you install GD library?
http://www.boutell.com/gd
Regards,
Johan
--
PHP General Mailing List (http://www.php.n
> >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
> http://www.faqts.com/know
> hi, I was wondering if someone could help me with a small problem I'm
> having.
>
> I'm running a script that periodically dumps information from one
> server to
> a database on another. We're running suse 7.1 and apache on the server
> containing the information, and the problem is I don't kn
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.
>
Anyone know when and
how you can sign up for 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 up for the conference in Franfurt (5-7 Nov
2001)?
Can't find any
information at there website, someone who can help me?! :o)
Regards
Johan
> Hey everyone...
>
> I've been programming in perl for about 3 years now, i have installed php
> and have been working on it for about three weeks. I started by converting
> some of the programs I've written in Perl to PHP it seems its pretty
> similar to Perl and not very hard to learn for a
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 unsubscribe,
>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
--
>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 PH
>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 (http://www.php.n
GD library only support PNG 256 color your PNG have more colors!
With Best Regards
Johan
- Original Message -
From: "Georg Buschbeck" <[EMAIL PROTECTED]>
To: "PHP-Liste (general)" <[EMAIL PROTECTED]>
Sent: Saturday, January 13, 2001 7:10 PM
Subject: [PHP] graphic problem...
i h
> you probably meant $totalfilesize += filesize($files);
Offcause. Sorry just think I'm a bit tired ;o). But the rest should work?
With Best Regards
Johan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTEC
>Is there a way in PHP to get the size of a directory? (so I can see how much disk
>space my >users are using in their home directory).
>Can someone also tell me what the PHP General list is exactly. Is it run by PHP folk
>only? Can >I subscribe to this list somewhere and maybe help someone els
75 matches
Mail list logo