nithan
-
Posts
4 -
Joined
-
Last visited
Never
Posts posted by nithan
-
-
I have a form which displays name and a text field after fetching names from the database in an array:
<input id='<? echo $name; ?>' type='text' name='students[<? echo $name; ?>]' disabled="disabled"/>
Example: Name and TextField.
When I want to insert it in database, I can't insert. Following is the code that I am using. Am I doing right thing?
$marks= $_POST['students'];
$marksn = array_filter($marks);
foreach($marksn as $name=>$vals){
trim($vals) !== '';
$query="INSERT INTO attend (Name, Training, Date, Attendance, Marks) VALUES ('$name','$trainings','$today','$val','$vals')";
$result=mysql_query($query);
-
Wow... Thanks a lot..
It worked for me...... You rock man..
-
Hello,
I have a code which displays name and number. It is working now but I want to sort the content on the basis of number... The code is given below:
while($rows = mysql_fetch_array($results)){
echo "". $rows['username'] ." ". $rows['COUNT(Completed_Sales)'] ."";
echo "<br />";
}
The result will look like this
Name Prdoducts.
Inserting Conents which are submitted in an array
in PHP Coding Help
Posted
-----------------------------------------
Thank you. This is the code that I am using: I am very new to PHP. Please correct me if I am wrong.
This is my Form code: