[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP: mysql_connect() undefined function



2006/8/16, Roberto C. Sanchez <roberto@familiasanchez.net>:
On Wed, Aug 16, 2006 at 05:24:44PM +0200, Paolo Pantaleo wrote:
> Hi,
> I am quite a newbie with PHP...
>
> I get this error message:
>
> Fatal error: Call to undefined function mysql_connect() in
> /home/paolo/webs/mypic/s_page/guestbook.php on line 19
>
> but  I can use phpMyAdmin
>
> The same page works ok on another Apache serve.
>
> Any suggestion?
>
Yes.  Please don't use PHP.  Unless you are a very experienced and very
disciplined programmer, it is far too easy to hack together some
unmaintainable crap.  Please use something more sane like Python or
maybe even Ruby (though I know many people who do not care for the Ruby
style).  Second, please don't use MySQL (or at least MySQL-specific
code).  If you use Python, I would recommend you make use of the DB-API
which allows you access any standard databse from your program (similar
to ODBC, which is also an option in Python, though DB-API is actually
included in the language now, IIRC).  That way your app stays portable
across database implementations.

Regards,

-Roberto


Well,

on my toy hosting service I haven't python or ruby, only mysql and
php. I konw Python and I like it very much, but I think I cannot use
any templating system (PSP or Cheetah, or whatever). Any idea about
that?

Moreover I want something that just works in little time, so PHP seems
quite good.

Greetings
PAolo


--
if you have a minute to spend please visit my photogrphy site:
http://mypic.co.nr



Reply to: