Jump to content

Running a seperate php file


Awanka

Recommended Posts

I need the code in the following php file to run:

 

========'recentCampSettingsExcel.php'==================

 

<?php

include 'includes/php_includes.php';

 

session_start();

$_SESSION['firstTime'] = 'GIRL';

session_write_close();

 

//window.close();

?>

=================================================

I'm currently executing this file with the following line of code:

 

<a href="javascript:void(0)" onclick=openPopup('recentCampSettingsExcel.php', 'recentCampSettingsExcel', 600, 500)"><b>(Export to Excel)</b></a>

 

I don't want to open it up using a popup though.  Is there some other function I can use that just executes whatever code is in the file without opening up anything?

Link to comment
https://forums.phpfreaks.com/topic/60255-running-a-seperate-php-file/
Share on other sites

If thats the case have a read up on AJAX. Here is an [ur=http://www.ajaxfreaks.com/tutorials/1/0.php]Introduction Tutorial[/url] on AJAX. It still uses ajax but it allows you to call a script in the background. AJAX can also return the results from the processed filed to the HTML page too.

You can accomplish this without AJAX.  Use the DOM to create an invisible iframe and point the src attribute at the script you'd like to run.  When the iframe is created, you can assign it an onload event handler that destroys the iframe; that way you aren't left with dozens of iframes if the user clicks the link multiple times.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.