I have a small problem.
I have a simple IF statement which depending on the condition I want it to run another PHP script in the same window but clearing the window on launch of the external script.
eg.
if ($matches >0){
---->>> run EDITDATA.PHP here
}else
{
print "No results found";
}
Can anyone help ?
Regards
Rob.
Launching another PHP Script
Moderator: General Moderators
-
Rob Watton
- Forum Newbie
- Posts: 4
- Joined: Wed Mar 19, 2003 5:22 am
- Location: Staffordshie, UK
-
bionicdonkey
- Forum Contributor
- Posts: 132
- Joined: Fri Jan 31, 2003 2:28 am
- Location: Sydney, Australia
- Contact:
-
Rob Watton
- Forum Newbie
- Posts: 4
- Joined: Wed Mar 19, 2003 5:22 am
- Location: Staffordshie, UK
-
phpfreak
- Forum Commoner
- Posts: 30
- Joined: Fri Mar 21, 2003 10:28 am
- Location: New Jersey,USA
- Contact:
external window
hi there,
this script takes the value from the text box match and if it is above 0 then it will call another php script called hello.php.
it runs hello.php in forif.php thus by running in the same window.The exit function in the hello.php does not allow the remaining script of the forif.php to run.
i hope this helped, if this is not what you wanted then please post it and i will try to help if i can.
===============
forif.php
-------------
<?php
session_start();
if(!isset($Submit))
{
}
else
{
if($Submit=="Find My match")
{
if($match>0)
{
include 'hello.php';
}
}
}
?>
<html>
<body>
<form name="form1" action="<?php echo $PHP_SELF?>">
Match:<br><input type="text" size="2" maximum="2" name="match">
<br><input type="Submit" name="Submit" value="Find My match">
</form>
</body>
</html>
------------
=============
hello.php
------------
<?php
echo "hi there how are u doing";
exit();
?>
=============
regards,
srinivas
this script takes the value from the text box match and if it is above 0 then it will call another php script called hello.php.
it runs hello.php in forif.php thus by running in the same window.The exit function in the hello.php does not allow the remaining script of the forif.php to run.
i hope this helped, if this is not what you wanted then please post it and i will try to help if i can.
===============
forif.php
-------------
<?php
session_start();
if(!isset($Submit))
{
}
else
{
if($Submit=="Find My match")
{
if($match>0)
{
include 'hello.php';
}
}
}
?>
<html>
<body>
<form name="form1" action="<?php echo $PHP_SELF?>">
Match:<br><input type="text" size="2" maximum="2" name="match">
<br><input type="Submit" name="Submit" value="Find My match">
</form>
</body>
</html>
------------
=============
hello.php
------------
<?php
echo "hi there how are u doing";
exit();
?>
=============
regards,
srinivas