Using insert variable


Posted on 16th Feb 2014 07:03 pm by admin

need a way to inert variable data to mysql database

$acc = "212121212";
$nok = "Nokia1100";
$db_link = mysql_connect("localhost","root", "");
mysql_select_db('Phones', $db_link ) or die (mysql_error());
$sql = "INSERT INTO `phones`.`phonedata` (`accNum`, `model`) VALUES ($acc,$nok)";

the coloured part is the one bringing

No comments posted yet

Your Answer:

Login to answer
179 Like 13 Dislike
Previous forums Next forums
Other forums

Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g

Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so

php wont update my db
hello,

sorry for posting in mysql forum but i dont know where exactly is the problem but here

Undefined variable: adHTML
Hello:

While checking my site error logs, I've noticed one repetitive error that fills the lo

read integers that returns a negative or prints the average
Im trying to finish this homework assignment by tommarow afternoon and I keep getting stuck.
Wr

newbie question about multiple queries
hi everyone,
I'm sorry to ask such a basic question, but I'm young and trying to learn php on my

Database connection failure
Hello All,

I am trying to create new connection to Oracle DB 10.1,
I could not see a

Multiple websites question.
Hi, does php have any functionality that enables a programmer to extract information from a website

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

Image upload - determine folder
I have an upload script that may be accessed from different directories. Problem is, the script is m

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash