[PHP] First PHP program

2008-12-13 Thread Anwarulhaq

I am working on MS.net.But now i days i want to work on PHP. I dont know the
basis of PHP. Can any one guide me how i have to start with PHP and which
editor i should use. Also the links of useful sites for help in PHP. I shall
be thankful.


Anwar UL-Haq 
-- 
View this message in context: 
http://www.nabble.com/First-PHP-program-tp20988175p20988175.html
Sent from the PHP - General mailing list archive at Nabble.com.


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



[PHP] Fwd: GD library for creating tables

2008-12-13 Thread Osman Osman
Hello,
  I'm looking for a library in PHP that will let me easily create tables
programmatically.  It would be great if I can just specify information about
the rows/columns, what each cell should contain, etc, and the table would
get created automatically.  I should be able to do anything I would be able
to do with normal HTML tables.  Is there anything like that available?

Thanks,
  Osman


Re: [PHP] First PHP program

2008-12-13 Thread Marc Steinert

Anwarulhaq wrote:

I am working on MS.net.But now i days i want to work on PHP. I dont know the
basis of PHP. Can any one guide me how i have to start with PHP and which
editor i should use. Also the links of useful sites for help in PHP. I shall
be thankful.
  
Since you've allready worked with .NET, I assume, that you are already 
familiar with basics principles of programming.
Zend (the company behind PHP) offers some great resources and tutorials 
for programmers that want to give a shot at PHP, without the obligatory 
what is a variable etc chapters, that most ppl tend to skip anyways.


http://devzone.zend.com/node/view/id/627 for instance is imo a good 
start, plus it covers PHP4  PHP5 equally.
http://php.net/ is great as reference, to quickly look up some functions 
and real world examples.


On the editor part I can strongly recommend Zend Studio, though it's not 
free:


http://www.zend.com/en/products/studio/

If you need something free, try weaverslave:

http://www.weaverslave.ws/

Hope, I could help you.

Marc

--
http://bithub.net/
Synchronize and share your files over the web for free



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



Re: [PHP] First PHP program

2008-12-13 Thread Kevin Waterson
This one time, at band camp, Anwarulhaq anwarulha...@gmail.com wrote:

 I am working on MS.net.But now i days i want to work on PHP. I dont know the
 basis of PHP. Can any one guide me how i have to start with PHP and which
 editor i should use. Also the links of useful sites for help in PHP. I shall
 be thankful.

have a look at phpro.org and for an editor, well vi(m) of course ;)
set yourself a project to make something, start coding, and ask lots
of questions.

Kevin

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



Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Richard Heyes
 Do you mean as seen on /. ?

I don't know, dotslash has a nice ring to it. Darn, the domains are gone...

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 5th)

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



Re: [PHP] Fwd: GD library for creating tables

2008-12-13 Thread Tim-Hinnerk Heuer
On Sat, 2008-12-13 at 10:18 +0200, Osman Osman wrote:
 Hello,
   I'm looking for a library in PHP that will let me easily create tables
 programmatically.  It would be great if I can just specify information about
 the rows/columns, what each cell should contain, etc, and the table would
 get created automatically.  I should be able to do anything I would be able
 to do with normal HTML tables.  Is there anything like that available?
 
 Thanks,
   Osman

$arr = array(array('celldata row 1, col1', 'celldata row 1, col2'),
array('celldata row 2, col1', 'celldata row 2, col2'));

table
 tr
   thheading1/th
   thheading2/th
/tr
?php foreach ($arr as $row): ?
  tr
  ?php foreach ($row as $col): ?
td?php echo $col ?/td
  ?php endforeach ?
  /td
?php endforeach ?
/table

Do you really need a library for that? I had thought about this too but
couln't come up with a good solution to do this generically and being as
flexible as this. All you have to do is copy/paste the html code and put
some php inbetween if you have a designed table with css and all that
jazz.

Tim


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



Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Yeti
I got so used to Opera's mouse gestures, now I can't work fluently
with other browsers. So I tried Chrome for like 5 minutes. It's always
like How do I go back to the previous page again or how do I open a
new tab?.
As long as Chrome is not being bundled with new computers the average
Windows users will stick to Internet Explorer. I know that from
customers who are referring to IE as the program on my computer's
desktop running the internet. So if Google can manage to transform
Chrome into the internet program M$ might be forced to make IE9
support Richard's HTML5 graphing.

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



Re: [PHP] Fwd: GD library for creating tables

2008-12-13 Thread Osman Osman
Hey Tim,
  Thanks for the reply.  I'm actually looking for something to do that
exactly, but output it as an image (via GD, imageMagick, etc).  I should've
been clearer; I mentioned it in the subject but not the actual e-mail.

There's actually a PEAR library that does that for HTML, HTML_Table:
http://pear.php.net/package/html_table/redirected.  I'm looking for
something very similar, which will allow me to output as an image.

On Sat, Dec 13, 2008 at 12:35 PM, Tim-Hinnerk Heuer th.he...@gmail.comwrote:

 On Sat, 2008-12-13 at 10:18 +0200, Osman Osman wrote:
  Hello,
I'm looking for a library in PHP that will let me easily create tables
  programmatically.  It would be great if I can just specify information
 about
  the rows/columns, what each cell should contain, etc, and the table would
  get created automatically.  I should be able to do anything I would be
 able
  to do with normal HTML tables.  Is there anything like that available?
 
  Thanks,
Osman

 $arr = array(array('celldata row 1, col1', 'celldata row 1, col2'),
 array('celldata row 2, col1', 'celldata row 2, col2'));

 table
  tr
   thheading1/th
   thheading2/th
 /tr
 ?php foreach ($arr as $row): ?
  tr
  ?php foreach ($row as $col): ?
td?php echo $col ?/td
  ?php endforeach ?
  /td
 ?php endforeach ?
 /table

 Do you really need a library for that? I had thought about this too but
 couln't come up with a good solution to do this generically and being as
 flexible as this. All you have to do is copy/paste the html code and put
 some php inbetween if you have a designed table with css and all that
 jazz.

 Tim




Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Richard Heyes
2008/12/13 Yeti y...@myhich.com:
 I got so used to Opera's mouse gestures, now I can't work fluently
 with other browsers. So I tried Chrome for like 5 minutes. It's always
 like How do I go back to the previous page again or how do I open a
 new tab?.

Umm. It's easy.

Going back:

1. Click the back button.
2. Right click on a web page and click back.

 As long as Chrome is not being bundled with new computers the average
 Windows users will stick to Internet Explorer.

Yes. Google will need to do something quite significant to fix that.

 I know that from
 customers who are referring to IE as the program on my computer's
 desktop running the internet. So if Google can manage to transform
 Chrome into the internet program M$ might be forced to make IE9
 support Richard's HTML5 graphing.

I have a dream... :-)

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 5th)

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



Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Richard Heyes
 As long as Chrome is not being bundled with new computers the average
 Windows users will stick to Internet Explorer. I know that from
 customers who are referring to IE as the program on my computer's
 desktop running the internet. So if Google can manage to transform
 Chrome into the internet program M$ might be forced to make IE9
 support Richard's HTML5 graphing.

Just to add, you could feasibly use the graphs on a website where IE
compatibility isn't a requirement. So an internal website or intranet
where you can stipulate that people need to be using Firefox, Opera,
Chrome or Safari.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 5th)

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



Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Dotan Cohen
2008/12/13 Richard Heyes rich...@php.net:
 As long as Chrome is not being bundled with new computers the average
 Windows users will stick to Internet Explorer. I know that from
 customers who are referring to IE as the program on my computer's
 desktop running the internet. So if Google can manage to transform
 Chrome into the internet program M$ might be forced to make IE9
 support Richard's HTML5 graphing.

 Just to add, you could feasibly use the graphs on a website where IE
 compatibility isn't a requirement. So an internal website or intranet
 where you can stipulate that people need to be using Firefox, Opera,
 Chrome or Safari.


Just to add, you could just stop coding for IE and alert users that IE
is not a supported browser. The longer we bend over backwards trying
to support that browser, the longer we will make each other suffer. I
am in the terrific position of coding websites as a profitable hobby
and not as a profession, so I can afford to pick and choose, but I
argue that professional web developers can simply leave out non-IE
features for the IE-using public. If we stop acting like IE
compatibility is the holy grain of web design then our customers will
have no reason to think that either.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Richard Heyes
 Just to add, you could just stop coding for IE and alert users that IE
 is not a supported browser.

You may want to re-read my post. The graphs work in everything *but* IE.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 5th)

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



Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Dotan Cohen
2008/12/13 Richard Heyes rich...@php.net:
 Just to add, you could just stop coding for IE and alert users that IE
 is not a supported browser.

 You may want to re-read my post. The graphs work in everything *but* IE.


I did catch that. But you mentioned that it shouldn't be used on the
internet because of that limitation, and my argument is that one
browser that is _known_ problematic should not be cause to eliminate a
feature for everyone else.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Richard Heyes
 I did catch that. But you mentioned that it shouldn't be used on the
 internet because of that limitation, and my argument is that one
 browser that is _known_ problematic should not be cause to eliminate a
 feature for everyone else.

That's a nice thought, but not feasible in reality.

-- 
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated December 5th)

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



Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Yeti
I have to defend poor little IE a little now. It supports XHTML and
CSS2 pretty well so far. And those standards came out a couple of
months ago.

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



[PHP] IP and gethostbyaddr() --- difference?

2008-12-13 Thread Martin Zvarík

Hello,

I am doing a view stats for my website.

I've seen that many of such statistic scripts store two values to 
identify the visitor: IP and getHostByAddr(IP)


I've been searching..., but I don't get why the IP address isn't enough 
by itself?! What is the getHostByAddr() = Internet host name for?


When IP changes the hostname does too and vice-versa?

What's the difference between these two values?
And why do I need both of them?


Martin

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



Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Ashley Sheridan
On Sat, 2008-12-13 at 15:08 -0800, Yeti wrote:
 I have to defend poor little IE a little now. It supports XHTML and
 CSS2 pretty well so far. And those standards came out a couple of
 months ago.
 
Well, as far as I'm aware, the other browsers have been supporting most
of CSS 2 for over a year now, so IE is still playing catch-up. And XHTML
has been out for a lot longer than a couple of months!


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] IP and gethostbyaddr() --- difference?

2008-12-13 Thread Ashley Sheridan
On Sun, 2008-12-14 at 00:28 +0100, Martin Zvarík wrote:
 Hello,
 
 I am doing a view stats for my website.
 
 I've seen that many of such statistic scripts store two values to 
 identify the visitor: IP and getHostByAddr(IP)
 
 I've been searching..., but I don't get why the IP address isn't enough 
 by itself?! What is the getHostByAddr() = Internet host name for?
 
 When IP changes the hostname does too and vice-versa?
 
 What's the difference between these two values?
 And why do I need both of them?
 
 
 Martin
 
The difference should be obvious, one is an IP address, the other is the
host for this IP address. It's really only useful where the IP address
is tied to an individual company, etc, as it's more meaningful than a
dotted decimal value!


Ash
www.ashleysheridan.co.uk


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



Re: [PHP] First PHP program

2008-12-13 Thread Bastien Koert
On Sat, Dec 13, 2008 at 4:45 AM, Kevin Waterson ke...@phpro.org wrote:

 This one time, at band camp, Anwarulhaq anwarulha...@gmail.com wrote:

  I am working on MS.net.But now i days i want to work on PHP. I dont know
 the
  basis of PHP. Can any one guide me how i have to start with PHP and which
  editor i should use. Also the links of useful sites for help in PHP. I
 shall
  be thankful.

 have a look at phpro.org and for an editor, well vi(m) of course ;)
 set yourself a project to make something, start coding, and ask lots
 of questions.

 Kevin

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


There are a host of free editors that can be looked at
Apatana Studio and NetBeans are excellent editors

-- 

Bastien

Cat, the other other white meat


[PHP] Re: IP and gethostbyaddr() --- difference?

2008-12-13 Thread Eduardo Vizcarra

test, ignore
Martin Zvarík mzva...@gmail.com escribió en el mensaje de noticias 
news:f0.ac.47862.f2544...@pb1.pair.com...

Hello,

I am doing a view stats for my website.

I've seen that many of such statistic scripts store two values to identify 
the visitor: IP and getHostByAddr(IP)


I've been searching..., but I don't get why the IP address isn't enough by 
itself?! What is the getHostByAddr() = Internet host name for?


When IP changes the hostname does too and vice-versa?

What's the difference between these two values?
And why do I need both of them?


Martin 



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



[PHP] apache and PHP / Eclipse

2008-12-13 Thread Eduardo Vizcarra
I am having a hard time trying to get some pages work. I have PHP 5.2.8, 
Apache 2.2 and MySQL 5.1 running in a Windows Vista home edition. All 
packages were installed, and configured, the strange thing is that pages 
commonly work but when I add a new line (e.g. an echo line) with a dummy 
text, Apache crashes and it is restarted


I am using Eclipese europa to create the code

e.g. I have this code and the page works:
include 'upper_pagina.php';
include 'forma.php';
 $link = mysql_connect(127.0.0.1,root,root);
 if (!$link)
 {
  echo table width='100%' border='0' cellspacing='0' cellpadding='5' 
bordercolor='FF'\n;

  echo tr\n;
  echo td bgcolor='FF9327'\n;
  echo bLa Base de datos no esta disponible en este momento.BR;
  echo Disculpe las molestias, intente mas tarde/b;
  echo /td\n;
  echo /tr\n;
  echo /table\n;
 }
 mysql_select_db(estoydevacacionesdb) or die(No pudo seleccionarse la 
BD.);

 $busquedasql1 = select * from servicios;
include 'bottom_pagina.php';

but if I add a new line   ($servicios1 = mysql_query($busquedasql1);) before 
the last include line, apache crashes, it has been very hard for me to 
identify what it is causing this problem


any clue ?

Regards
Eduardo 



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



Re: [PHP] Chrome 1.0 released

2008-12-13 Thread Dotan Cohen
2008/12/14 Yeti y...@myhich.com:
 I have to defend poor little IE a little now. It supports XHTML and
 CSS2 pretty well so far. And those standards came out a couple of
 months ago.


How about HTML 4[.1] support? I would have like to see that fixed
before adding new features.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه‍-و-ي
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü