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

I think i'm using the syntax incorrectly
Hi Everyone!

I'm new to this forum and a newbie with PHP - I'm glad I found this site - I hop

Checking BOM Authorization Group
Hai Friends,

I have developed a mulitilevel BOM display report. End users have been assig

isset undefined variable
Hi all,

Hope someone can point out the obvious. I've a log in script, if you dont enter a use

PHP & Java
Hello,

can PHP code be used inside java code?

Code: [Select]<SCRIPT LANGUAGE=&q

Embedding flash object in Else statement
This is my first major project in PHP and I'm having some trouble embedding a flash object in an Els

Update not working ... please help
Hi,

I am trying to update a row using an edit form by passing id of the row .. but it is not

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

why aint this working?
i have this code:

Code: $num = 250;
$count = ($num - $rcount);

echo $rc

IS this code correct
The reason i ask is everything underneath it appears to be alink as well, tis blimmin annoying

user validation always displaying invalid ? please help
Hello,

I have 2 accounts and there is a field in mysql called validated it can be either &quo

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