473,387 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Can I use the same PHP program to call itself?

Hi All,
May I write the following code in PHP?
Expand|Select|Wrap|Line Numbers
  1. echo '<ol><FORM NAME="HOUR" ACTION="TForm.php" METHOD="GET">'.
  2.                 '<input type="submit" name="subDisplay" value="DISPLAY">'.
  3.                 '<input type="submit" name="subThumbs" value="SLIDESHOW">'.
  4.                 '<input type="text" name="JCC" size="12" readonly value="'.$JCC.' images in ">'.
  5.                 '<input type="text" name="idir3" size="40" readonly value="'.$thour.'">'.
  6.                 '<input type="submit" name="subDelete" value="DELETE">'.
  7.                 '</form></ol>';    
Then can I receive this code in the same program with the following code
Expand|Select|Wrap|Line Numbers
  1. if (isset($_GET['subDisplay'])){        
  2.     if(isset($_GET['idir3']));{
  3.         $dirname=$_GET['idir3'];
  4.         showimages($dirname);}}if (isset($_GET['subThumbs'])){    
  5.     $ss = $_GET['idir3'];
  6.     if($ss=='../KamImgs') {exit("Not authorized");};
  7.     if(! is_dir($ss)) {exit("Not a valid directory");} ;if (isset($_GET['NEXT'])){print_r2 ("5NEXT");
  8.     $timg=$_GET['$_SESSION'];
  9.     $JCOUNT=$_GET['jcount'];$JCOUNT++;print_r2("5JCOUNT = $JCOUNT");
  10.     $JTOT=$_GET['jtot'];print_r2("5jtot = $JTOT");
Nov 9 '15 #1
1 1462
Why are you do this?
You wanna generate a html form?

Maybe you can try this:
Expand|Select|Wrap|Line Numbers
  1. <FORM NAME="HOUR" ACTION="TForm.php" METHOD="post">
  2. <input type="submit" name="subDisplay" value="DISPLAY">
  3. <input type="submit" name="subThumbs" value="SLIDESHOW">
  4. <input type="text" name="JCC" size="12" readonly value="<?php echo $JCC; ?> images in ">
  5. <input type="text" name="idir3" size="40" readonly value="<?php echo $thour; ?>">
  6. <input type="submit" name="subDelete" value="DELETE" />
  7. </form>
  8.  
php code inside html code,
Hope to useful
Dec 1 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Reimar Bauer | last post by:
Hi all is it possible to call from a main program another one the same as it is done by the browser? If I begin I am able to do http://server/main.php?name="test" in the browsers URL. ...
1
by: Bora | last post by:
Should a class be allowed to operate on an array of classes of the same type as itself? Say, class X { ..... void func( X* x); }
1
by: Jung Joon Park | last post by:
Hi everyone. I am JJ Park. I got some questions in C++. First of all, my English is not perfect, because I am foreigner. I have got C++ code, which have no syntex error in Visual C++ ver6.0...
2
by: ACaunter | last post by:
Hi all, I have to push a button twice to open a new window, only because i have to set some session variables before opening the window so i can't have the opennewwindow function called in the...
10
by: yaniv.dg | last post by:
hi all, i'm bumping into smething very starnge its very simple code but from some reason the program is acting strange this is my code: #include<stdio.h> #include<conio.h> void main(void) {...
24
by: John | last post by:
I know this is a very fundamental question. I am still quite confused if the program call stack stack should always grows upwards from the bottom, or the opposite, or doesn't matter?? That means...
27
by: Neil | last post by:
Hello all! I wrote program with a array of pointers, and I suspect they are pointing at each other in the Do ...While loop. Something is messed up with the increment variable word. A program...
6
by: =?Utf-8?B?QnJvbmlzbGF2?= | last post by:
I need to run more then 1 instance of the same program but also I need to know which instance is running. In C++ code was: int nInstance = 0; char szAppName; m_dwMutexReturn =...
0
by: John Scheldroup | last post by:
Source: Article Mixing C and C++ Code in the Same Program By Stephen Clamage, Sun Microsystems, Sun ONE Studio Solaris Tools Development Engineering ...
1
by: poijoy | last post by:
I need to use two forms in one program for another school project. The textbook is annoyingly vague as to how to do this. It states that I should use the line Dim secondForm as New Form2() ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.