View Feed
group-icon
PHP Programmers
Community for PHP Programmers : Ask questions, doubts and help each other get better at PHP
299 Members
Join this group to post and comment.
Vicky One
Vicky One • Aug 14, 2013

php and xammp server

Hello everyone!

I am new to php language.
I want to know if we install xammp server on our pc . Is there any need to install php 5.5.1 or any other version through php.net and mysql for data base or simply start work on the editor in simple php and sql language having xammp installed??I am much confused upon it.. Can someone help me about it????

The second question is i have made a form and action="form.php" and when i click the submit button it moves to form.php but does not provide the end result which is being fetched from the text area. as form.html is another page and form.php is another page residing with html page location and a;so in htdocs folder in xammp.. Plz help me..
Nayan Goenka
Nayan Goenka • Aug 14, 2013
No you don't need to separately install them. Make sure you have the latest xampp server installed.

For the form action, Can you post the action script here? Which method are you using to collect the data?
Vicky One
Vicky One • Aug 14, 2013
HTML CODE

form.htm<br />


What is your name?








PHP CODE/////

form.php

welcome.Your name is:
echo $_POST["fname"];
?>



The result comes// welcome.Your name is:

and please also tell me the location of these two files if form.htm is placed in a folder on desktop and form.php in htdocs of xammp. is it necassary to have a copy of form.php within same folder as form.htm. I have done both cases but it does not work..it does not show name written in text area of form.
Nayan Goenka
Nayan Goenka • Aug 14, 2013
You have to keep both the files in the same directory. Only the files inside the htdocs folder are available or lets say part of the server. All of the related files have to be there. I will test your code in my own system and get back to you with the solution. 😀
Vicky One
Vicky One • Aug 15, 2013
ok thx
Vicky One
Vicky One • Aug 15, 2013
form.html


 Form 

 
 
 
whta is your favourite author name?


form.php




form.php
 

 
 
 
welcome.Your name is:
echo $_POST["fname"];
?>


NOw i have:​


c:\desktop\form\form.html​
c:\desktop\form\form.php​

and also c:\xammp\htdocs\form.php​

Activating xammp server it is not working..Now wht i do??​
2nd Scenario
if we have one page like this. form.php
[/INDENT]
[INDENT=1][/INDENT]
[INDENT=1]form.php[/INDENT]
[INDENT=1][/INDENT]
[INDENT=1][/INDENT]
[INDENT=1]What is your name?[/INDENT]
[INDENT=1][/INDENT]
[INDENT=1]
[/INDENT]
[INDENT=1]
[/INDENT]
[INDENT=1][/INDENT]
[INDENT=1][/INDENT]
[INDENT=1][INDENT=1]if(isset($_POST["fname"])) {[/INDENT]
[INDENT=1]echo 'Welcome. Your name is: ' . $_POST["fname"];[/INDENT]
[INDENT=1]}[/INDENT]
[INDENT=1]?>[/INDENT]
[INDENT=1] 

and using https://localhost/form.php...it works but i want them to be separated as like above 1st condition and it should work.​
Nayan Goenka
Nayan Goenka • Aug 15, 2013
Dude you need to put the form.html in the same folder, which is htdocs. It will not work untill then. Both files need to be part of the server. No matter how good your code is, if both the concerned files cannot be accessed by the server how can they interact?
Vicky One
Vicky One • Aug 15, 2013
i have done that too. still it is not working.. Well i will find any way for it to work..


but now i got a problem regarding joomla
Nayan Goenka
Nayan Goenka • Aug 15, 2013
Vicky One
i have done that too. still it is not working.. Well i will find any way for it to work..


but now i got a problem regarding joomla


Your code seems correct. I don't understand the issue then. Anyways, What about joomla?
Vicky One
Vicky One • Aug 16, 2013
for every new websit to be create on joomla. do we ever nedd to copy a copy of joomla in out htdocs. or if we add a single copy of joomla in htdocs we can create multiple websites over it?
Vicky One
Vicky One • Aug 16, 2013
the idea i my mind is developed that for every new website we have to copy a new joomla folder and then rename it to develop anew website on joomal using joomla installer??
Nayan Goenka
Nayan Goenka • Aug 16, 2013
Vicky One
the idea i my mind is developed that for every new website we have to copy a new joomla folder and then rename it to develop anew website on joomal using joomla installer??


Even if you are using a same framework but different projects, you have to make multiple copies of it unless both are linked in some way. you cannot host two different websites on a single framework. The DNS would not be able to resolve them.
Vicky One
Vicky One • Aug 16, 2013
ok thx that was helpful to reduce confusion.
Vicky One
Vicky One • Aug 16, 2013
NOw what would be your preference for dunamic websites


Jomla
Wordpress
or
simple coding...

To make a professional dynaimc website..Should we use tool or should do coding???
Nayan Goenka
Nayan Goenka • Aug 16, 2013
Vicky One
NOw what would be your preference for dunamic websites


Jomla
Wordpress
or
simple coding...

To make a professional dynaimc website..Should we use tool or should do coding???


You should use pre-made frames for making dynamic environment websites. Its pointless to scrap code yourself again. Ultimately you will wind up making something resembling them. So why to code again when it is already done. Not to waste time, effort and money and start instantly.

Share this content on your social channels -