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";
Did you know?Explore Trending and Topic pages for more stories like this.
$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

Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

php - xml what is the best way to do this.
IN essence I want to have a script calling the info from the database.. I have no problem thus far,

SOAP Issue
Hi,

I am facing some understanding problem with SOAP basic.kindly recommend some SOAP expert.

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

Creating an invoice
Using fpdf I am trying to create an invoice to send to clients. The products are sold in pricing tie

Include ("Absolute Path") of a file?
I'm not sure what I'm doing wrong. I am writing my php code in the same directory of the file that

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

Referential Integrity problem when inserting into 2 tables at same time
Hello Everyone,

Im relativity new to PHP and MySQL and i have come up against a problem. i h

Simple code help with redirects
I am trying to figure out a redirect script that detects if the browser is IE 7 and if it does, redi

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