Forum Moderators: coopster
$theinsert = "INSERT INTO my_profiles(fname,lname,title,mrank,website,linkedin,twitter,facebook,photo,cv, speaker,speaktopics,stafforfac,startdate,building,room,phone,email,courses,college,program,institution1,year1,
degree1,institution2, year2,degree2,institution3,year3,degree3,assocs,awards,pubs,interests) VALUES('".$fname."','".$lname."','".$title."','".$mrank."','".$website."','".$linkedin."','".$twitter."','".$facebook."','','','". $speaker."','".$speaktopics."','".$stafforfac."','".$startdate."','".$building."','".$room."','".$phone."','".$email."',
'".$courses."','".$college."','".$program."','".$institution1."','".$year1."','".$degree1."','".$institution2."','". $year2."','".$degree2."','".$institution3."','".$year3."','".$degree3."','".$assocs.'","'.$awards."','".$pubs."','".$interests."')";
$r=mysqli_query($mysqli,$theinsert) or die(mysqli_error($mysqli)." Q=".$theinsert); [edited by: lorax at 5:02 pm (utc) on Mar 5, 2014]
INSERT INTO my_profiles(fname,lname,title,mrank,website,linkedin,twitter,facebook,photo,cv,speaker,speaktopics,stafforfac,startdate,
building,room,phone,email,courses,college,program,institution1,year1,degree1,institution2,year2,degree2,institution3,year3,
degree3,assocs,awards,pubs,interests) VALUES('Firstname','Lastname','Dean','','http://www.nospam.com','','','','','','Yes',
'Anything web related.','Staff','September 1, 2012','Flint Hall','','802-333-3333','bob@nospam.com','','','','','','','','','','','','','","','','')
instead of typing all the fields horizontally, I do them vertically
// With one exception: braces surrounding arrays within strings allows constants
// to be interpreted
print "Hello {$arr[fruit]}"; // Hello carrot
print "Hello {$arr['fruit']}"; // Hello apple
Resource: [php.net...]
$theinsert =
"INSERT INTO my_profiles
(
fname,
lname,
title,
mrank,
website,
linkedin,
twitter,
facebook,
photo,
cv,
speaker,
speaktopics,
stafforfac,
startdate,
building,
room,
phone,
email,
courses,
college,
program,
institution1,
year1,
degree1,
institution2,
year2,
degree2,
institution3,
year3,
degree3,
assocs,
awards,
pubs,
interests
)
VALUES
(
'{$fname}',
'{$lname}',
'{$title}',
'{$mrank}',
'{$website}',
'{$linkedin}',
'{$twitter}',
'{$facebook}',
'',
'',
'{$speaker}',
'{$speaktopics}',
'{$stafforfac}',
'{$startdate}',
'{$building}',
'{$room}',
'{$phone}',
'{$email}',
'{$courses}',
'{$college}',
'{$program}',
'{$institution1}',
'{$year1}',
'{$degree1}',
'{$institution2}',
'{$year2}',
'{$degree2}',
'{$institution3}',
'{$year3}',
'{$degree3}',
'{$assocs}',
'{$awards}',
'{$pubs}',
'{$interests}'
)"
;