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

Undefined index: username HELP NEWBIE
I am trying a simple login/logout for my website. It works well with checking if the username exists

Good Programming and Web Design Books
Hi,

I recived a pm today from a fellow phpfreaker regarding php books, i replied with the fo

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

Error: SQL Syntax; Line 1
Code:

<?php require "global_settings.php"; ?>
<title&g

Displaying Column Names
I have a question regarding the ability to show the column names from my table/query.
What I'm lo

PHP IMAGE UPLOAD SCRIPT
Hi for the last week i have been looking for scripts that will upload a photo to a certain folder wh

help with calculations on a flat text file
hello,
I have this code below that is attached to a flat file like this:
Email:LastName:FirstN

Onclick problem in Firefox
Hi,
I am using a . It doesn't seem to

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

About imagecopyresampled()
Hello,

I am looking to use this function to resize parts of an image to a fixed thumbnail siz

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