Posted by Jerry Stuckle on 05/21/07 13:48
Ravi wrote:
> On May 21, 12:50 am, Akhenaten <jonko...@gmail.com> wrote:
>> I'm wanting to create an hyperlink that will execute a mysql_query and
>> then refresh the current page if it's clicked on. I've similar things
>> created via javascript but didn't know if such was possible with PHP.
>
> These all are long methods take a function for displaying image and
> for sucessfull message
>
> like:
>
> if (isset($_GET['q']) && $_GET['q']=='y')
> {
> mysql_query(...);
> display("message");
> }
> else
> display();
>
> function display($msg){
> if(is_empty($msg){
> then logic for displaying image
> }else{
> logic for displaying the sucessfull message.
> }
> }
>
> make sure all the variables in the function should be global variables.
>
You should not use global variables. If you need a variable in a
function, you should pass it as a parameter.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|