Jump to content

Pradeep_Chinna

Members
  • Posts

    29
  • Joined

  • Last visited

Pradeep_Chinna's Achievements

Member

Member (2/5)

0

Reputation

  1. @requinix: yes ur 1st opt i need. Anyone can download and run it anywhere...
  2. Can anyfreak tell me how could i make my php web application to executable app ??
  3. Sorry for late :-P Am using mobile not computer. There is no other bb or color opts in mobile version. @ch0cr3: i've deletd unnecessary code. this is my delete.php: <body background="bg_tile.jpg"> <div class="content"> <div class="header"> <div class="uname"> <div class="welcome"> <?php if(isset($_SESSION['username'])) { echo "Welcome ".$_SESSION['username']."<br/>"."<br/>";?> <?php echo "<br/>"; } ?> </div> <div class="logout"> <a class="logout2" href="index.php">Logout</a> </div> <span id="date_time"></span> </div> <div class="separator"></div> </div> <div class="right-div"> <?php $no=$_GET['number']; $checkbox= $_POST['checkbox']; // Connect to the database $con = mysql_connect("localhost","admin",""); // Make sure we connected succesfully if(! $con) { die('Connection Failed'.mysql_error()); } // Select the database to use mysql_select_db("test",$con); if(is_array($_GET['del'])) { $ids = array_map('intval', $_GET['del']); $ids = implode(',',$ids); } $order = " DELETE FROM budget WHERE ID IN($ids) "; $result=mysql_query($order, $con); if(isset($result)) { print "Deleted successfully "; echo "<br/>"; printf ("Updated records: %d\n", mysql_affected_rows()); echo "<br/>"."<br/>"; } ?> </div> <div class="footer"> <div class="footer_inside" ><p class="text">©2013 All Rightst5a </p> </div> </div> </div> </body>
  4. @ch0cu3r: not done ch0cu3r.... i've closed if loop before sql query stmt. Is that true ? Its going to my delete.php and executing but showing updated records: -1 ..???? My code After query if(isset($sql)) {echo"deletd sucfly"; printf("updated records:", mysql_affected_rows()); }
  5. @jazzman1 : yes i knew it aint a meaningful title...due to my device problem i was unable to write complete title of my post. No problm it wont happn again...:-)
  6. Due to device problm i was unable to post my exact doubt.., My actual questn is, Deleting multiple rows using checkboxs and anchor tag
  7. Can anyone help me out my problem... When i click on delete link, it should confirm through confirm box and delete checked multiple rows... This is my code... $sql = " SELECT * FROM budget where NAME=\"$name\"; $rs = mysql_query($sql,$con); if(mysql_num_rows($rs) == 0) { echo("<p class=\"no\">Sorry, NO Records Found..!</p> <p class=\"no\">Pleasd try with another Name.</p> "); } else { echo "<table id='main-table' cellspacing='0' cellpadding='0' class=\"table1\"> <tr class=\"rowh\"> <td>Date</td> <td>Name</td> <td colspan=\"2\"> ACTIONS </td> </tr>"; while ($row=mysql_fetch_array($rs)) { echo ("<tr><td class=\"rowr\">$row[DATE]</td>"); echo ("<td class=\"rowr\">$row[NAME]</td>"); echo ("<td ><a class=\"rowrl\" href==\"edit_form.php?number=$row[iD]\"> Edit </a></td>"); echo ("<td ><input name=\"check\" type=\"checkbox\" /></td></tr>"); } echo "<tr class=\"delete\" align=\"right\" > <td colspan=\"7\" align=\"right\"><a class=\"rowrl\" href=\"delete.php?number=$row[iD]\" onclick=\"return confirm('Do you really want to DELETE ?');\"> Delete </a></td> </tr>"; } ?>
  8. Succccceeeesssss......:-O:-O:-O thanks alot my dear...:-)
  9. Getting fatal error bro...! Error: cant use function return value in write context in at if(empty(trim($name))). I've tried with is_resource and empty($name) too.... Not displayng my data...!
  10. Pravin, trq: Thank You very much...:-) am a beginner of learning frameworks...so, any suggestions to learn quicky and easily ?
  11. This is the code what tried. Data is divided and displayd no.of pages too... But, when i click 2link/page, its showng sorry no data found. Help me... <?php $name = $_POST['name']; $category = $_POST['category']; $con = mysql_connect("localhost","zxzx","xzxz") or die("Unable to connect"); $db = mysql_select_db("test",$con) or die("Unable to select DB"); if(isset($_GET['page'])) { $page = $_GET['page']; } else { $page = 1; } $sf = ($page-1) * 16; $sql = " SELECT * FROM budget where NAME=\"$name\" LIMIT ".$sf.",16 "; $rs = mysql_query($sql,$con); if(mysql_num_rows($rs) == 0) { echo("<p class=\"no\">Sorry, NO Records Found..!</p> <p class=\"no\">Please try with another Name.</p> "); } else { echo "<table id='main-table' cellspacing='0' cellpadding='0' class=\"table1\"> <tr class=\"rowh\"> <td>Date</td> <td>Name</td> <td colspan=\"2\"> ACTIONS </td> </tr>"; while ($row=mysql_fetch_array($rs)) { echo ("<tr><td class=\"rowr\">$row[DATE]</td>"); echo ("<td class=\"rowr\">$row[NAME]</td>"); echo ("<td ><a class=\"rowrl\" href=\"edit_form.php?number=$row[iD]\"> Edit </a></td>"); echo ("<td ><a class=\"rowrl\" href=\"delete.php?number=$row[iD]\" onclick=\"return confirm(' Do you really want to DELETE ?');\"> Delete </a></td></tr>"); } } </table> </td> </tr> </table> <?php $sql1 = "SELECT COUNT(NAME) FROM BUDGET where NAME=\"$name\" "; $rs1 = mysql_query($sql1,$con); $row1 = mysql_fetch_row($rs1); $total = $row1[0]; $tp = ceil($total/16); for($i = 1; $i <= $tp; $i++) { echo "<a href='edit.php?page=".$i."'>".$i."</a> "; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.