|
Posted by strawberry on 05/31/06 08:36
take a close look at $grading_fairness_comments
Peschtra wrote:
> Hello --
>
> I am trying to write to a a MySql database using php, and I seem to be
> hitting a wall.
>
> I am attaching my php file in case someone can look at it. When I run
> it, I don't get any error messages and all my echoes come through but
> nothing is written to my database. I think I am missing something
> stupid. Any help would be appreciated.
>
> Thanks,
> Peter
>
> --------------030200090501090308020103
> Content-Type: text/html
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline;
> filename="eval.php"
> X-Google-AttachSize: 3113
>
> <html>
> <body>
>
> <?php
>
> $overall =3D $_POST["overall"];
> echo $overall;
> $overall_comments =3D $_POST["overall_comments"];
> echo $overall_comments;
> $difficulty =3D $_POST["difficulty"];
> $difficulty_comments =3D $_POST["difficulty_comments"];
> $homework =3D $_POST["homework"];
> $homework_comments =3D $_POST["homework_comments"];
> $pace =3D $_POST["pace"];
> $pace_comments =3D $_POST["pace_comments"];
> $grading_structure =3D $_POST["grading_structure"];
> $grading_structure_comments =3D $_POST["grading_structure_comments"];
> $grading_fairness =3D $_POST["grading_fairness"];
> $grading_fairness_comments =3D $_POST["grading_fairness_comments"];
> $tests =3D $_POSTS["tests"];
> $tests_comments =3D $_POST["tests_comments"];
> $labs =3D $_POST["labs"];
> $labs_comments =3D $_POST["labs_comments"];
> $questions =3D $_POST["questions"];
> $questions_comments =3D $_POST["questions_comments"];
> $approach =3D $_POST["approach"];
> $approach_comments =3D $_POST["approach_comments"];
> $fav_topic =3D $_POST["fav_topic"];
> $fav_act =3D $_POST["fav_act"];
> $least_fav_topic =3D $_POST["least_fav_topic"];
> $least_fav_act =3D $_POST["least_fav_act"];
> $extra_topic =3D $_POST["extra_topic"];
> $tests_prepared =3D $_POST["tests_prepared"];
> $didnt_get =3D $_POST["didnt_get"];
> $change =3D $_POST["change"];
> $again =3D $_POST["again"];
> $again_comments =3D $_POST["again_comments"];
> $general_comments =3D $_POST["general_comments"];
> $name =3D $_POST["name"];
> $ip =3D GetHostByName($REMOTE_ADDR);
> echo $ip;
> $year =3D $_POST["year"];
> echo $year;
> $math =3D $_POST["math"];
> $science =3D $_POST["science"];
> $grade =3D $_POST["grade"];
> echo $grade;
>
> echo "<br />Processed <br />";
>
> $link =3D mysql_connect("db377.perfora.net", "dbo165086404", "jxtJdnCJ") =
> or die ('I cannot connect to the database because: ' . mysql_error());
>
> echo "Connected <br />";
>
> mysql_select_db(db165086404) or die('Could not select database');
>
> echo "db Selected <br />";
>
> echo "Hi <br />";
>
> mysql_query("INSERT INTO 2006_eval (overall, overall_comments,difficult, =
> difficulty_comments, homework, homework_comments, pace, pace_comments, gr=
> ading_structure, grading_structure_comments, grading_fairness, grading_fa=
> irness_comments, tests, tests_comments, labs, labs_comments, questions, q=
> uestions_comments, approach, approach_comments, fav_topic, fav_act, least=
> _fav_topic, least_fav_act, extra_topic, tests_prepared, didnt_get, change=
> , again, again_comments, general_comments, name, ip, year, math, science,=
> grade, number) VALUES ('$overall', '$overall_comments', '$difficulty', '=
> $difficulty_comments', '$homework', '$homework_comments', '$pace', '$pace=
> _comments', '$grading_structure', '$grading_structure_comments', '$gradin=
> g_fairness', $grading_fairness_comments', '$tests', '$tests_comments', '$=
> labs', '$labs_comments', '$questions', '$questions_comments', '$approach'=
> , '$approach_comments', '$fav_topic', '$fav_act', '$least_fav_topic', '$l=
> east_fav_act', '$extra_topic', '$tests_prepared', '$didnt_get', '$change'=
> , '$again', '$again_comments', '$general_comments', '$name', '$ip', '$yea=
> r', '$math', '$science', '$grade')");
> ?>
>
> Inserted
> </body>
> </html>
>
> --------------030200090501090308020103--
Navigation:
[Reply to this message]
|