Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/18/2021 in all areas

  1. If only PHP had a way you could increment a count. $i = 0; $content = ' <style> td { font-weight: normal; font-size: 8px; line-height: 12px; color: #000000; } </style> <table id="receiptTable" style="max-height: 1000px;" > <tr> <td width = "7%" > '. ++$i .' </td> <td width= "8%" > '.'xxxxxx'.' </td> <td width= "10%" > '.'xxxxxx'.' </td> <td width= "30%"> '.'123'.' '.'Kg'.' </td> <td width= "20%" > RM '.'123.45'.' </td> <td width= "20%" > RM '.'123.45'.' </td> </tr> <tr> <td width = "7%" > '. ++$i .' </td> <td width= "8%" > '.'xxxxxx'.' </td> <td width= "10%" > '.'xxxxxx'.' </td> <td width= "30%"> '.'123'.' '.'Kg'.' </td> <td width= "20%" > RM '.'123.45'.' </td> <td width= "20%" > RM '.'123.45'.' </td> </tr> <tr> <td width = "7%" > '. ++$i .' </td> <td width= "8%" > '.'xxxxxx'.' </td> <td width= "10%" > '.'xxxxxx'.' </td> <td width= "30%"> '.'123'.' '.'Kg'.' </td> <td width= "20%" > RM '.'123.45'.' </td> <td width= "20%" > RM '.'123.45'.' </td> </tr> </table> '; OUTPUT
    1 point
  2. PHP runs on the server, javascript runs on the client after the PHP has finish running and sent the page to the client. Store $PAGE in a hidden field in your html <input type="hidden" id="page-name" value="<?=$PAGE?>" > In your script you can then access it with var page = $("#page-name").val() then send it i your ajax request $.post( "script.php", {"page":page}, // data function(content) { $("#notif").html(content) }, "TEXT" ) In script.php, access the page from $_POST['page]
    1 point
This leaderboard is set to New York/GMT-04:00
×
×
  • 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.