473,395 Members | 2,468 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,395 software developers and data experts.

Just curious is all . . .

CodeNoobster
Sup guys (and girls).So iv'e dabbled in a little bit of PHP lately and decided to try this out. This isn't homework or an assignment, its just experimentation. However this has answered some questions and raised a few as well.

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. echo 'What is your name?<p>';
  3. echo "<form action=\"huh.php\" method=\"POST\">";
  4. echo "<input type=\"text\" name=\"yourname\">";
  5. echo "<input type=\"submit\" name=\"submit\">";
  6. echo "</form>";
  7.  
  8. if (isset($_POST["yourname"])&&!empty($_POST["yourname"])){
  9. $name = $_POST["yourname"];
  10. echo 'your name is '.$name.'. Thank you for telling me'; 
  11. }
  12. ?>
  13.  
I would like to know if there are any benefits to using separate HTML code to get form data or is this the best way to go about doing that, and if there are other uses for outputting html in PHP . . . thanks in advance . . .
Feb 5 '14 #1

✓ answered by Claus Mygind

Since you can bounce in and out of php sometimes it can be less coding and easier to read if you only box in the php code and leave the rest pure html.

3 1070
Claus Mygind
571 512MB
Since you can bounce in and out of php sometimes it can be less coding and easier to read if you only box in the php code and leave the rest pure html.
Feb 5 '14 #2
Dormilich
8,658 Expert Mod 8TB
I would like to know if there are any benefits to using separate HTML code
you can modify the HTML without touching the PHP script (and add an error there).
Feb 6 '14 #3
@ Claus and Dormilich : Many thanks :) . . .
Feb 6 '14 #4

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

Similar topics

3
by: Elaine Jackson | last post by:
I'm new to Python, and I've noticed the following: >>> def f(a,b): a+=b >>> def g(a,b): a=a+b >>> p= >>> q= >>> r= >>> s=
5
by: drj0nson | last post by:
Without getting too mathematical : how do you print/handle big numbers? for ( int i = 1 ; i < 10 ; i ++) cout << (123456789 << i) << endl; 246913578 493827156 987654312 1975308624...
10
by: MLH | last post by:
Suppose the following... Dim A as Date A=#7/24/2005# I wish to compare value of A against 2 other values: 1) 8/1/2005 2) 9/1/2005 Which is better and why... First:
5
by: Michael Culley | last post by:
I have an MDI application that was occasionally refusing to close. When clicking on the cross at the top right the app would just not do anything and the only way to close it was to terminate it....
2
by: S.S.Raja | last post by:
I learned from my friend, there are very less VC++ Developers all over the world and its very rare to find MCP or MCSD with VC++...is that true? can i get any specific information on this...like...
4
by: Lance | last post by:
Hi all, I'm curious as to the technicalities of why a particular method declaring and calling is faster than the other. The C syntax is: \\\\\ BOOL PathMatchSpec( LPCSTR pszFile, LPCSTR...
1
by: Andrej Nerat | last post by:
Greetings, I was playing a bit with web services and asked myself if I could use P/Invoke to create AVI file in Web service from some images(bitmaps). I could already use P/Invoke to incorporate...
34
by: chandu | last post by:
Hello every body , upto now i saw advantages of C# only,i am curious about what are the disadvantages of C#..(because any programming language should have some positives and negatives..) Thanks...
11
by: Liz | last post by:
anyone have any idea why there have been (at least) 82 VS 2008 post-release messages here on the C# board but only 5 on the VB.NET board; are the VB crowd just not interested?? strikes me as a...
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: 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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.