neo0506
-
Posts
10 -
Joined
-
Last visited
Never
Posts posted by neo0506
-
-
Oh ok! here is the code anyway...hopefully, this helps!
Notice: Undefined variable: question in C:\Program Files\Apache Group\Apache2\htdocs\generator\gen.php on line 43
Notice: Undefined variable: qutypes in C:\Program Files\Apache Group\Apache2\htdocs\generator\gen.php on line 45
line 43 = echo "$question";
line 45 = if($qutypes == "2") buttonShow($qutypes);
This problem, I bet is a small problem, and you guys are probably laughing at me...lol
Thanks in advance!
-
showed me all of the problems with the code, trying to fix it....still need help tho! lol
-
Hope this helps!
Like I said, the code, when run only just gives me an empty screen!
I need it to display ALL of my records from the table topic_content.
Hope someone can help, been stuck on this for ages!
[attachment deleted by admin]
-
skali, your solution only just displays the DATA...the thing is, im try to display the questions with the designated buttons i.e (radio buttons and multiple)
The thing is when I use 'MY' code, it just shows a blank page and not the questions or buttons......not even an error message!
Thanks tho!
-
I am trying to view ALL of the records in my rows onto a page. For some reason, it won't display them...
Please help!
this is the coding I have done:
?php
require('./inc/function.php');
//require('./test/test14.php');
getRequestVariables();
if(!connectDB()) // Connect to 'qdbase' database
{
die("Could not connect: ".mysql_error()); // error if not connected to the database
}
if(!isset($recordi)) $recordi = 0;
$result = mysql_query("select * from topic_content")
or die("Select topic_content error! : ".mysql_error());
$rows = mysql_fetch_all($result);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
foreach ($rows as $rowindex => $rows)
{
//display
echo "$question";
echo "
";
if($qutypes == "2") buttonShow($qutypes);
echo "
";
if(!empty($choice1)) buttonShow($qutypes); if(!empty($choice1)) echo "$choice1"; echo "
";
if(!empty($choice2)) buttonShow($qutypes); if(!empty($choice2)) echo "$choice2"; echo "
";
if(!empty($choice3)) buttonShow($qutypes); if(!empty($choice3)) echo "$choice3"; echo "
";
if(!empty($choice4)) buttonShow($qutypes); if(!empty($choice4)) echo "$choice4"; echo "
";
if(!empty($choice5)) buttonShow($qutypes); if(!empty($choice5)) echo "$choice5"; echo "
";
if(!empty($choice6)) buttonShow($qutypes); if(!empty($choice6)) echo "$choice6"; echo "
";
}
?>
-
This is what I have written for the action form.
<form action="qmodpage.php" method="post">
<input type=submit value="Finished">
</form>
but when I click the button, it doesn't go to he qmodpage.php. The page just blinks when I click on the button.
please help!
thank you!
-
Hi,
I have inserted a form button onto my html page and would like to link that to a php page when clicked on.
how would I go about doing that?
Much appriciated, Thank You!
-
Hi,
I am in need of urgent help! I am a complete noobie to php and I am trying to use both checkboxes and radio buttons. At the moment, I have found a code that will display my questions w/ radio buttons. I need to be able to make use of checkboxs also but don't know how to. The reason being is that I am trying to display my questions one by one with different question types. Please, some1 help! The code is as follows:
<?php
require('./inc/function.php');
getRequestVariables();
if(!connectDB())
{
die("Could not connect: ".mysql_error());
}
if(!isset($recordi)) $recordi = 0;
$result = mysql_query("select * from topic_content limit $recordi, 1")
or die("Select topic_content error! : ".mysql_error());
$row = mysql_fetch_row($result);
$qutypes = $row[2];
if(!empty($row[3])) $question = $row[3];
else
{
echo "no more question!";
exit;
}
if(!empty($row[4])) $choice1 = $row[4];
if(!empty($row[5])) $choice2 = $row[5];
if(!empty($row[6])) $choice3 = $row[6];
if(!empty($row[7])) $choice4 = $row[7];
if(!empty($row[8])) $choice5 = $row[8];
if(!empty($row[9])) $choice6 = $row[9];
$recordi++;
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title></title>
</head>
<body>
<input type="hidden" name="recordi" value="<?=$recordi?>">
<?php echo "$question"; ?><br>
<?php if(!empty($choice1)) buttonShow($qutypes); ?> <?php if(!empty($choice1)) echo "$choice1"; ?><br>
<?php if(!empty($choice2)) buttonShow($qutypes); ?> <?php if(!empty($choice2)) echo "$choice2"; ?><br>
<?php if(!empty($choice3)) buttonShow($qutypes); ?> <?php if(!empty($choice3)) echo "$choice3"; ?><br>
<?php if(!empty($choice4)) buttonShow($qutypes); ?> <?php if(!empty($choice4)) echo "$choice4"; ?><br>
<?php if(!empty($choice5)) buttonShow($qutypes); ?> <?php if(!empty($choice5)) echo "$choice5"; ?><br>
<?php if(!empty($choice6)) buttonShow($qutypes); ?> <?php if(!empty($choice6)) echo "$choice6"; ?><br>
<?
</body>
</html>
I can't see my records. Please Help
in PHP Coding Help
Posted
jesirose,
just read your 'how to ask a question page'...i broke some rules!
copied the code you entered but I still get a blank page...this time no errors anymore.
i think this is a complex problem...