This topic is locked

DELETE AND PRINT ISSUE

5/19/2008 4:51:37 AM
PHPRunner General questions
S
sweethard010 author

HI to everyone.. there is 1 member that has most likely the same problem with me... But it seems that the answer doesnt apply to mine....

How am i going to VIEW my SELECTED RECORDS TO BE DELETED rather than prompting me with a pop-up script just asking if i really want to delete..?

OR

IS IT POSSIBLE IF I REDIRECT my page to PRINT PAGE then display only the records that i had selected..?

J
Jane 5/20/2008

Hi,
to redirect to the print page with selected records just use Print selected option.

S
sweethard010 author 5/23/2008

hi Jane ... how am i going to do that ..??? where can i find the print deleted option?

J
Jane 5/23/2008

Hi,
there is no print deleted option.

You can select records and print selected records. To delete these records add Delete button on the print page.

S
sweethard010 author 5/23/2008

hi again...i have really no idea about that DELETE BUTTON.... as i look at my PRINTER FRIENDLY PAGE, I cannot see any BUTTON to ADD on my PRINT PAGE,.. How will i add a DELETE BUTTON ON PRINT PAGE..?

honestly im too new for this application.. i have the latest version but i didnt see any solution about for my problem using this...

Kindly help me and elaborate pls... thnx....

J
Jane 5/23/2008

Hi,
to add delete link to the print page use Insert PHP code snippet option on the Visual Editor tab.

Here is a sample:

echo " <a href=# onClick=\"if (confirm('delete selected?')) window.location.href='TableName_print.php?delete=yes';\">Delete</a>";


Then add following code to the Print page: Before SQL query event:

if ($_SESSION["where"] && $_REQUEST["delete"]=="yes")

{

$strWhereClause = whereAdd($strWhereClause,$_SESSION["where"]);

global $conn,$strTableName;

$strDelete = "delete from ".$strTableName." where ".$_SESSION["where"];

db_exec($strDelete,$conn);

echo "records was deleted";

}
$_SESSION["where"] = $strWhereClause;