Hi Friend

I need a alert msg display in php, without using javascript.

Pls help me to solve it

$pqty = $bdatam["sum(curr_qty)"];
$pamt = $bdatam["sum(curr_amount)"];
$btotal= $bgtqty+$pqty;

i want to display $btotal in alert msg display.

Pls help me

Member Avatar for diafol

php cannot pop a box as alert boxes are js. You can certainly show areas of the page as a static box, which with CSS can be 'fixed' and 'z-indexed' to appear to float over the page. However, you'd still need js to get rid of the box otherwise you'd have to reload. My take anyway. If you want interactivity, you need js.

Alert box is client side property, that can not be accessed via PHP.
Any reason why you don't want JS?

I haven't understand about PHP popup can anyone help in this.....

Member Avatar for diafol

Popups are js.

Hi Friends

Sorry for the delay reply,

i have used the below code for my requirement onblur="alert('<?php echo "Budget Qty : ".$bgtqty; echo '\n\n'; echo $finaltext; ?>')"

onblur="alert('

Above is nothing but javascript. I think you want to say that, you do not want to use javascript function.

s, but temporary i used it

If you need pop up means JS is the best way. You can use Js within PHP as follows

$pqty = $bdatam["sum(curr_qty)"];
    $pamt = $bdatam["sum(curr_amount)"];
    $btotal= $bgtqty+$pqty;
    echo '<script>alert("Tota="'.$btotal.')</script>';

i have done it karthik

How did u? Can u please show your code?

s, but temporary i used it what i have post, but i am trying to get php alert, i dont know is it possible.

But lets try

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.