Click here to Skip to main content
15,500,853 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerCross Post: Please Ingore Pin
Keith Barrow23-Mar-11 9:48
professionalKeith Barrow23-Mar-11 9:48 
GeneralRe: Cross Post: Please Ingore Pin
Pete O'Hanlon23-Mar-11 10:21
mvaPete O'Hanlon23-Mar-11 10:21 
GeneralRe: Cross Post: Please Ingore Pin
Keith Barrow23-Mar-11 10:44
professionalKeith Barrow23-Mar-11 10:44 
Questionsend data Pin
Elham M23-Mar-11 4:19
MemberElham M23-Mar-11 4:19 
AnswerRe: send data Pin
cjoki23-Mar-11 5:32
Membercjoki23-Mar-11 5:32 
GeneralRe: send data Pin
Elham M24-Mar-11 4:14
MemberElham M24-Mar-11 4:14 
GeneralRe: send data Pin
cjoki24-Mar-11 5:55
Membercjoki24-Mar-11 5:55 
GeneralRe: send data Pin
Elham M24-Mar-11 23:17
MemberElham M24-Mar-11 23:17 
$_POST and $_GET just for input type but my variable isn't that.this is my code I want when user click on button insert data to database but I can't access to variable
$row[lsname],$row[teachername],...even this page and other page?another my question is why variable like$_POST[t] isn't recognaize in function?!!!even I write global
$_POST[t] but it's error
<?php

 session_start();
 echo ($_SESSION[users]);
echo "$_POST[t]";
?>
<html>


 <form method="post" action="reqire.php">
<?php
 require_once ('db.php');
$db = new db("root","","regstudent","localhost");
 function aa()
 {

     require_once ('db.php');
$db = new db("root","","regstudent","localhost");
$db->query("INSERT INTO register(`user`, `lsname`, `teachername`, `classday`, `starttime`, `endtime`, `examtime`)VALUES('$_SESSION[user]','$row[lsname]','$row[teachername]','$row[classday]','$row[starttime]','$row[endtime]','$row[examtime]') ");

echo "one record added";
 }
  echo "<table border='4' bordercolor='CC0099' width=100% height=20% >";
  echo "<tr><th>Name</th><th>Professor</th><th>Capacity</th><th>Exam</th><th     colspan='3'>classtime</th></tr>";
   $result = mysql_query("SELECT * FROM class");
    while($row = mysql_fetch_assoc($result))
    {
    if($_POST[t]==$row[lsname])
  {
        foreach($row as $key=>$var2)
     {
       echo "<td align='center'>$var2 </td>";
     }
    echo "<td align='center'><input type='submit'  value='Register' onclick='aa()'></td> ";


    }

      echo "</tr>";
    }
   echo"</table>";

?>
</form>
</html>

please help me I mystify in my project :( 

GeneralRe: send data Pin
effayqueue25-Mar-11 2:25
Membereffayqueue25-Mar-11 2:25 
GeneralRe: send data Pin
cjoki25-Mar-11 3:52
Membercjoki25-Mar-11 3:52 
GeneralRe: send data Pin
Elham M25-Mar-11 4:15
MemberElham M25-Mar-11 4:15 
GeneralRe: send data Pin
cjoki25-Mar-11 4:32
Membercjoki25-Mar-11 4:32 
GeneralRe: send data Pin
Elham M25-Mar-11 8:05
MemberElham M25-Mar-11 8:05 
GeneralRe: send data Pin
cjoki25-Mar-11 11:02
Membercjoki25-Mar-11 11:02 
GeneralRe: send data Pin
Elham M25-Mar-11 22:17
MemberElham M25-Mar-11 22:17 
GeneralRemove a File Using PHP Pin
Haroon Mughal23-Mar-11 3:35
MemberHaroon Mughal23-Mar-11 3:35 
GeneralRe: Remove a File Using PHP Pin
Joan M30-Mar-11 8:48
professionalJoan M30-Mar-11 8:48 
GeneralPHP Tips By Google Master Pin
Haroon Mughal23-Mar-11 3:33
MemberHaroon Mughal23-Mar-11 3:33 
GeneralPHP performance tips Pin
Haroon Mughal23-Mar-11 3:32
MemberHaroon Mughal23-Mar-11 3:32 
Questioncss and link styles Pin
Joan M22-Mar-11 5:59
professionalJoan M22-Mar-11 5:59 
AnswerRe: css and link styles Pin
Luc Pattyn22-Mar-11 6:25
sitebuilderLuc Pattyn22-Mar-11 6:25 
QuestionWhy do images are not shown? Pin
Joan M21-Mar-11 6:43
professionalJoan M21-Mar-11 6:43 
AnswerRe: Why do images are not shown? Pin
Luc Pattyn21-Mar-11 6:50
sitebuilderLuc Pattyn21-Mar-11 6:50 
GeneralRe: Why do images are not shown? Pin
Joan M21-Mar-11 7:10
professionalJoan M21-Mar-11 7:10 
GeneralRe: Why do images are not shown? Pin
Luc Pattyn21-Mar-11 7:22
sitebuilderLuc Pattyn21-Mar-11 7:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.