My teacher said that i still "havn't structured the code properly and it make it much harder to read thru and troubleshoot" he added a hidden imput type, resulting it the code looking like this
[PHP]
<?php
$host="localhos t"; // Host name
$username="oeua oeu"; // Mysql username
$password="aoio ei"; // Mysql password
mysql_connect(" $host",...
User Profile
Collapse
-
Ok we are REALLY close now, i'm not getting any more errors, but the querys arn't being deleted. you can check out the php in action here
delete2.php
and heres the current code
[PHP]
<?php
$host="localhos t"; // Host name
$username="user "; // Mysql username
$password="pass "; // Mysql password
mysql_connect(" $host",...Leave a comment:
-
OK I need a little help with the above instruction, im not sure how to make that happen. otherwise ive made all the suggested changes and im recieveng Undefined index: checkbox from this area
[PHP]
else
{
if($_POST['delete'] == 'Delete'){
for($i=0;$i<cou nt($_POST['checkbox']);$i++){
$del_id = $_POST['cbnbr'][$i];
$sql = "DELETE FROM article WHERE id='$del_id'";...Leave a comment:
-
this is what im currently looking at codewise, this is what it come out as on my server
[PHP]<?php
$host="localhos t"; // Host name
$username="user "; // Mysql username
$password="pass "; // Mysql password
mysql_connect(" $host", "$username" , "$password" )or die("cannot connect");
mysql_select_db ("ragra");...Leave a comment:
-
i was instructed by my teacher to do this
You probably already have a loop to display each data row. Just add a
counter to that row....and then echo an input with the final counter
value as that input value at the end of the form that wraps the table.
so ive added this into the loop,
[PHP]echo "<imput type='hidden' NAME='cbnbr' VALUE='$cbnbr' size=60>";
$cbnbr= $_POST['cbnbr'];...Leave a comment:
-
-
Problem deleting multiple checkboxes
So my problem lays in the $_POST['delete'] if statement at the bottom operation, I keep getting Notice: Undefined index: delete and also Notice: Undefined index: checkbox. Please let me know if you have any ideas or suggestions im desperate to get this working, its part of my midterm project due tomorrow! Thank you so much
[PHP]$host="localhos t"; // Host name
$username="user name"; // Mysql username...
No activity results to display
Show More
Leave a comment: