array!!?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

the thing is, if the query was expecting those columns, why didn't they exist? (I'm assuming that you didn't write the script)
BT-loader
Forum Commoner
Posts: 31
Joined: Fri Dec 17, 2004 5:29 pm
Location: SWEDEN

Post by BT-loader »

No i havn´t wrote this script. ;)
BT-loader
Forum Commoner
Posts: 31
Joined: Fri Dec 17, 2004 5:29 pm
Location: SWEDEN

Post by BT-loader »

What about those columns then..?

Why can´t i store any info in the columns? Do i have to add or change something in the script, or what??

Please answer... :(
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post by andre_c »

how do you know it isn't saving?
try echoing the values that you're entering before you actually execute the script to see if they're actually on the variables,
post the query that you're using to grab those values from the database
BT-loader
Forum Commoner
Posts: 31
Joined: Fri Dec 17, 2004 5:29 pm
Location: SWEDEN

Post by BT-loader »

Here is the code... :oops:

Code: Select all

<?
$email = $HTTP_COOKIE_VARS&#1111;"email"];
$password = $HTTP_COOKIE_VARS&#1111;"password"];

if ($email == '') &#123;
Header("Location: index.php?error=pw");
&#125;
if ($password == '') &#123;
Header("Location: index.php?error=pw");
&#125;
require("config.php");

mysql_connect ("$servername", "$dbusername", "$dbpassword")
or die ("Could not connect");
mysql_select_db("$dbname");

$p01 = strip_tags($p01);
$p02 = strip_tags($p02);
$p03 = strip_tags($p03);
$p04 = strip_tags($p04);
$p05 = strip_tags($p05);
$p06 = strip_tags($p06);
$p07 = strip_tags($p07);
$p08 = strip_tags($p08);
$p09 = strip_tags($p09);
$p10 = strip_tags($p10);
$p11 = strip_tags($p11);
$p12 = strip_tags($p12);
$p13 = strip_tags($p13);
$p14 = strip_tags($p14);
$p15 = strip_tags($p15);
$p16 = strip_tags($p16);
$p17 = strip_tags($p17);
$p18 = strip_tags($p18);
$p19 = strip_tags($p19);
$p20 = strip_tags($p20);
$p21 = strip_tags($p21);
$p22 = strip_tags($p22);
$p23 = strip_tags($p23);
$p24 = strip_tags($p24);
$p25 = strip_tags($p25);
$p26 = strip_tags($p26);
$p27 = strip_tags($p27);
$p28 = strip_tags($p28);
$p29 = strip_tags($p29);
$p30 = strip_tags($p30);
$p31 = strip_tags($p31);
$p32 = strip_tags($p32);
$p33 = strip_tags($p33);
$p34 = strip_tags($p34);
$p35 = strip_tags($p35);
$p36 = strip_tags($p36);
$p37 = strip_tags($p37);
$p38 = strip_tags($p38);
$p39 = strip_tags($p39);
$p40 = strip_tags($p40);
$p41 = strip_tags($p41);
$p42 = strip_tags($p42);
$p43 = strip_tags($p43);
$p44 = strip_tags($p44);
$p45 = strip_tags($p45);
$p46 = strip_tags($p46);
$p47 = strip_tags($p47);

if($del_profile=="1")&#123;
$q1 = "update db_cam_profiles set p01='',p02='',p03='',p04='',p05='',p06='',p07='',p08='',p09='',p10='',p11='',p12='',p13='',p14='',p15='',p16='',p17='',p18='',p19='',p20='',p21='',p22='',p23='',p24='',p25='',p26='',p27='',p28='',p29='',p30='',p31='',p32='',p33='',p34='',p35='',p36='',p37='',p38='',p39='',p40='',p41='',p42='',p43='',p44='',p45='',p46='',p47='' where profile_id = '$id'";
mysql_query($q1) or die(mysql_error());
&#125; else &#123;
$q2 = "update db_cam_profiles set p01='$p01',p02='$p02',p03='$p03',p04='$p04',p05='$p05',p06='$p06',p07='$p07',p08='$p08',p09='$p09',p10='$p10',p11='$p11',p12='$p12',p13='$p13',p14='$p14',p15='$p15',p16='$p16',p17='$p17',p18='$p18',p19='$p19',p20='$p20',p21='$p21',p22='$p22',p23='$p23',p24='$p24',p25='$p25',p26='$p26',p27='$p27',p28='$p28',p29='$p29',p30='$p30',p31='$p31',p32='$p32',p33='$p33',p34='$p34',p35='$p35',p36='$p36',p37='$p37',p38='$p38',p39='$p39',p40='$p40',p41='$p41',p42='$p42',p43='$p43',p44='$p44',p45='$p45',p46='$p46',p47='$p47' where profile_id = '$id'";
mysql_query($q2) or die(mysql_error());
&#125;

Header("Location: edit_main.php?edit=personal&saveinfo=ok");
?>
Post Reply