CrazyEngineers
  • Vicky One
    Vicky One

    MemberAug 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..
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Nayan Goenka

    MemberAug 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?
    Are you sure? This action cannot be undone.
    Cancel
  • Vicky One

    MemberAug 14, 2013

    HTML CODE
    <html>
    <head><title> form.htm
    </title></head>
    <body>
    <form action="form.php" method="POST">
    What is your name?
    <input type="text" name="fname">
    <br>
    <br>
    <input type="submit">
    </form></body></html>

    PHP CODE/////
    <html>
    <head><title>form.php</title></head>
    <body>
    welcome.Your name is:
    <?php
    echo $_POST["fname"];
    ?>
    </body></html>


    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.
    Are you sure? This action cannot be undone.
    Cancel
  • Nayan Goenka

    MemberAug 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. 😀
    Are you sure? This action cannot be undone.
    Cancel
  • Vicky One

    MemberAug 14, 2013

    ok thx
    Are you sure? This action cannot be undone.
    Cancel
  • Vicky One

    MemberAug 14, 2013

    form.html

    <html>
    <head><title> Form </title></head>
    <body>
     
     
     
    <form action="form.php" method="POST">
    whta is your favourite author name?
    <input type="text" name="Author">
    <br><br>
    <input type="submit" name="submit">
     
     
    </form></body></html>

    form.php



    <html>
    <head><title>form.php</title></head>
     
    <body>
     
     
     
    welcome.Your name is:
    <?php
    echo $_POST["fname"];
    ?>
    </body></html>

    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]<html>[/INDENT]
    [INDENT=1]<head><title>form.php</title></head>[/INDENT]
    [INDENT=1]<body>[/INDENT]
    [INDENT=1]<form action="extra.php" method="POST">[/INDENT]
    [INDENT=1]What is your name?[/INDENT]
    [INDENT=1]<input type="text" name="fname">[/INDENT]
    [INDENT=1]<br>[/INDENT]
    [INDENT=1]<br>[/INDENT]
    [INDENT=1]<input type="submit">[/INDENT]
    [INDENT=1]</form>[/INDENT]
    [INDENT=1]<?php[/INDENT]
    [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]</body></html> 

    and using #-Link-Snipped-# works but i want them to be separated as like above 1st condition and it should work.​
    Are you sure? This action cannot be undone.
    Cancel
  • Nayan Goenka

    MemberAug 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?
    Are you sure? This action cannot be undone.
    Cancel
  • Vicky One

    MemberAug 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
    Are you sure? This action cannot be undone.
    Cancel
  • Nayan Goenka

    MemberAug 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?
    Are you sure? This action cannot be undone.
    Cancel
  • Vicky One

    MemberAug 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?
    Are you sure? This action cannot be undone.
    Cancel
  • Vicky One

    MemberAug 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??
    Are you sure? This action cannot be undone.
    Cancel
  • Nayan Goenka

    MemberAug 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.
    Are you sure? This action cannot be undone.
    Cancel
  • Vicky One

    MemberAug 16, 2013

    ok thx that was helpful to reduce confusion.
    Are you sure? This action cannot be undone.
    Cancel
  • Vicky One

    MemberAug 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???
    Are you sure? This action cannot be undone.
    Cancel
  • Nayan Goenka

    MemberAug 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.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register