User Profile

Collapse

Profile Sidebar

Collapse
beam1985
beam1985
Last Activity: Mar 9 '08, 08:51 PM
Joined: Mar 9 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • beam1985
    replied to Problem deleting multiple checkboxes
    in PHP
    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",...
    See more | Go to post

    Leave a comment:


  • beam1985
    replied to Problem deleting multiple checkboxes
    in PHP
    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",...
    See more | Go to post

    Leave a comment:


  • beam1985
    replied to Problem deleting multiple checkboxes
    in PHP
    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'";...
    See more | Go to post

    Leave a comment:


  • beam1985
    replied to Problem deleting multiple checkboxes
    in PHP
    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");...
    See more | Go to post

    Leave a comment:


  • beam1985
    replied to Problem deleting multiple checkboxes
    in PHP
    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'];...
    See more | Go to post

    Leave a comment:


  • beam1985
    replied to Problem deleting multiple checkboxes
    in PHP
    yes its there, Line 32...
    See more | Go to post

    Leave a comment:


  • beam1985
    started a topic Problem deleting multiple checkboxes
    in PHP

    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...
    See more | Go to post
No activity results to display
Show More
Working...