Question:
Is it normal to make the first page not index.html, but index.php?
Willbor
2010-01-28 16:36:51 UTC
Is it good and smart to make a first page not as index.HTML, but as index.PHP if needed. Most of Submit buttons on index.php page send data to the same index.php. Is that OK?
Is it a popular idea? I decided to do that because a lot of content stays the same even when user presses a button Submit.
Now I know it's a good idea to use AJAX, but I didn't read anything about it and probably befor AJAX was created delevopers used another method. So, please, could anybody tell me if it's a good idea to create index.php and "If ....else"statementes inside so that depending on what button was pressed I can decide what to display on the page. Or programmers definitely use any easier and better ideas?

Thank you.
Four answers:
2010-01-28 16:45:09 UTC
Your question doesn't acknowledge that one thinks and designs a web site, not choosing what is popular like ABBA or The Beatles or Radiohead.



If you are building a site using php, your landing page will usually be index.php



If you are building a site using html, it will likely be index.html, or index.shtml if you use SSI.



I think you should spend some time studying web developemnt. Your questions do not have a simple answer.
saima
2014-11-26 22:07:11 UTC
In index.PHP or index.HTML they (.PHP and .HTML) are extensions it is up to you that what do you want if your site is dynamic then definitely u need to do .php you can still use .HTML and still do php coding in it by altering .htaccess file here but this is out of scope in this question.



It depends on which page you want to throw your action of the form if you don’t need to go to other page then stay on the same using "isset" for form submission yes staying on same page is better option because you can generate error message for user with less effort.



Ajax is basically enables you submit your form without refreshing the page it is much better if you use JQuery’s AJAX instead of regular AJAX
2010-01-28 16:55:06 UTC
What are you babbling about? First of all do you understand what exactly happens to php vs html code? php is basically used to generate code, it's a macro type language based on a specific syntax with delimiters, it's used for dynamic applications.



You need to go back to the basics so you can understand what all these layers/pieces do!



html/css/php



RTFM
?
2016-11-08 11:16:33 UTC
ok Patel to date is the only utd fan who has come on right here and mentioned trustworthy adventure to Chelsea. the rest are whining with reference to the referee... goodness me they sound like yet another set of followers


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...