Jump to content

Pradeep_Chinna

Members
  • Posts

    29
  • Joined

  • Last visited

Everything posted by Pradeep_Chinna

  1. Thank u requinix...:-)
  2. @requinix: yes ur 1st opt i need. Anyone can download and run it anywhere...
  3. Can anyfreak tell me how could i make my php web application to executable app ??
  4. 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>
  5. @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()); }
  6. @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...:-)
  7. Due to device problm i was unable to post my exact doubt.., My actual questn is, Deleting multiple rows using checkboxs and anchor tag
  8. 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>"; } ?>
  9. Thank u:-) Solved 100%...:-)
  10. Succccceeeesssss......:-O:-O:-O thanks alot my dear...:-)
  11. 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...!
  12. Thanks to all freaks :-)
  13. Thank u :-)
  14. Pravin, trq: Thank You very much...:-) am a beginner of learning frameworks...so, any suggestions to learn quicky and easily ?
  15. 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> "; } ?>
  16. Hi freaks :-) i want to learn php mvc and frameworks. Can anyone suggest me a website/blog/ebook to learn frameworks and mvc. Pls Help me...
  17. Hi phpfreaks...:-) when i write simple jquery code in my php file, jquery code is not working/running...only php code is working...:-( why its happening ? Do we require any plugins ? Please give me one simple example like show/hide jquery code in php
  18. firstly, please go though this image (img.jpg). so that you can understand easily. how to highlight the selected link in menu bar. like, if we select one link then it should get different color background. and Rest of links should get default color. i.e., link represents your current page in particular website I hope you understood. HELP me...
  19. can anyone tell me, What is the procedure or steps to send a text message from my web application to a mobile...?? please help me... Thank you in advance..
  20. thank you I got it...
  21. sorry sir try to understand me. i am a beginner. could u tell me what kind of changes i have to do in my php.ini file ?
  22. HELP ME... HOW DO I FIX THIS PROBLEM....??? Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
  23. php: ...bla bla bla.... echo "<tr class=\"top bottom row\"> // This is perfectly wrong declaration. please tel me what is actually correct one to declare multiple css class names here ?? // <td>Date</td> <td>Name</td> <td>Purpose</td> </tr> "; CSS: tr.top td { border-top: thin solid blue; } tr.bottom td { border-bottom: thin solid green; } tr.row td:first-child { border-left: thin solid red; } tr.row td:last-child { border-right: thin solid black; } please help me out... in Advance, Thank you.
  24. @PravinS: sorry...Not useful.
  25. please help me out... How to get this (img.jpg) type of result. I have 4 columns namely, ID, NEW, AMOUNT, TOTAL. please see my image attachment to understand easily. for first row, TOTAL= AMOUNT, for 2nd row, TOTAL= AMOUNT(ROW1) + AMOUNT(ROW2) OR AMOUNT(ROW2) + TOTAL(ROW1), for 3rd row, TOTAL= AMOUNT(ROW1) + AMOUNT(ROW2)+AMOUNT(ROW3) OR AMOUNT(ROW3) + TOTAL(ROW2). and so on... means loop will be upto the end of table. I hope u understood my doubt. please help me out... THANK YOU.
×
×
  • 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.