Jump to content


Photo

Notepad Php File

import

  • Please log in to reply
2 replies to this topic

#1 phpnewbie1212

phpnewbie1212

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 31 December 2012 - 08:46 AM

I am newbie when it comes to PHP.You probably know this from the question i am about to ask. I have created a php file in Notepad text editor. I want the file to connect to my database in mysql. I am unsure what the best approach is to link the file to the database in mysql that i wish to activate ?

#2 Barand

Barand

    Sen . ( ile || sei )

  • Gurus
  • 14,373 posts
  • LocationCheshire, UK

Posted 31 December 2012 - 08:52 AM

this link mysqli_connect should help

moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts
|baaSelect| generate js and php code for dynamic linked dropdowns

 


#3 Jessica

Jessica

    This is not my name.

  • Gurus
  • 8,982 posts
  • LocationDallas, TX
  • Age:26

Posted 31 December 2012 - 12:53 PM

The editor you use to write PHP is irrelevant to connecting to the database, just so you know. You should also look into a full IDE, we have a thread in misc about different ones.
My goal in replying to posts is to help you become a better programmer, including learning how to debug your own code and research problems. For that reason, rather than posting the solution, I reply with tips and hints on how to find the solution yourself. See below for useful links when you get stuck.

How to Get Good Help: How to Ask Questions | Don't be a help vampire
Debugging Your Code: Debugging your SQL | What does a php function do? | What does a term mean? | Don't see any errors?
Things You Should Do: Normalize Your Data | use print_r() or var_dump()
Lulz: "Functions should not have side effects." - trq

Please take a look at my new PHP/Web Dev blog: The Web Mason - Thanks!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com