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

newbie question
Hi out thereIm totaly new in this forum and to .net and vb so here is a totaly newbie question.I wan

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

Please help with SMTP Authenticated PHP Email Form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

check_changed_data - I can't get data from the called method event
I use check_changed_data to trigger my event method.

The method delivers er_changed_data.

Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Dealing with code in db query
I am dealing with C code and I need to make sure it is encoded some how to ensure its integrity and

php wont update my db
hello,

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

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

how can i expire the submitted page using session.
hi,
i'm new to php world.
i'm using "post" method.
when i submit it,data goes to

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