Hi ray-solomon,
thanks so much for that. I have given this a go:
<?php
if (isset($_POST['svnupdate']
{
passthru('sh ./svnupdate.sh');
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form1">
<input type="submit" name="svnupdate" value="SVN Update">
</form>
But I am getting a 500 server error.
It states
Premature end of script headers:
Would you please be able to shed some light on this?
Cheers
Stuart
Main Topics
Browse All Topics





by: ray-solomonPosted on 2007-09-09 at 00:04:47ID: 19856012
Use the passthru function to output your echo statements from the bash script after it was ran.
Just create a simple html form and submit it, then add a little php code to handle a condition.
Here is a simple guide to htaccess authentication if needed. http://www.technotrade.com
Just put this code in a single file and name it whatever.php. then run it from your browser.
<?php
if (isset($_POST['svnupdate']
{
passthru('sh ./bash.sh');
}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="form1">
<input type="submit" name="svnupdate" value="SVN Update">
</form>