Am I trying to connect mysql in php?

Asked

Viewed 100 times

0

Good afternoon

I’m trying to connect mysql to php, because it’s generating the following error " Call to Undefined Function mysql_conect()", someone please help me

  • 2

    mysql_connect() it seems that 1 n is missing.

  • Thank you very much Thank you

  • I will only put as answer after you put as right. Clicking on the transparent V, then it turns green! Thanks!

  • This question seems to be out of date because it is about a typo in the source code, and will hardly be useful for future visitors.

  • 4

    About ask OP pro give Accept, has already been discussed at the goal. Now, ask Accept for a "practically comment" I find even more forced...

  • 1

    @Rogerscorrêa, the destination of this type of questions is the removal/delete/evaporation, leading upvotes and accepts with her. It’s best to focus on quality questions. Begging accepts not elegant, not... check out the meta post linked by Bacco.

  • But he needed help :P

Show 2 more comments

1 answer

1


Missed an N instead of conect would be connect mysql_connect(blabla);, I must warn you that in future versions of PHP (3years?) your code will stop working, and if you are working for a client, this will be bad, since mysql_connect was discontinued (will be removed in the future), moreover it is more insecure.

I suggest you start using mysqli or PDO, basic tutorial links:

http://blog.thiagobelem.net/guia-pratico-de-mysqli-no-php/ (mysqli)

http://www.rafaelwendel.com/2011/12/tutorial-pdo-php-data-object/ (PDO)

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.