Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4096664
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:04:31+00:00 2026-05-20T20:04:31+00:00

When I submit my form; the resultant page seems to output just raw php

  • 0

When I submit my form; the resultant page seems to output just raw php code rather than actually executing. the funny thing is, if I just run my code and hard code the $_get array values it works a charm I’m running this on a virtual server (Xampp) if that helps.

  *The related get code *

    $search = $_GET['searcharg'];

The form:

<form action="search.php" method="get">

Search:<input type="text" name="searcharg" /><br />
<input type="submit" value="Submit" />

</form> 

Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:04:32+00:00Added an answer on May 20, 2026 at 8:04 pm

    Give you only posted one line, a few basic items.

    First up are you using the opening and closing php tags?

    <?php
    $search = $_GET['searcharg'];
    echo $search;
    ?>
    

    If not, they are needed.


    Next make sure you are using http://localhost to access the file and that you are not accessing it using the file:///etcetcetc version (as catfish hinted to). As it has to be ran through the Apache server in order to be handled properly.


    If you are, then the issue will most likely lay within Apache not setup properly to handle the .php extension, but xampp should handle that for you. So try the above option and see how that goes. If it is the problem that apache is not recognizing the .php extension, you can add this to your httpd.conf and then restart apache and it should kick it into gear:

    AddType application/x-httpd-php .php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the document.form.submit() function for a rather large input form (hundreds of fields,
is it possible to bind Enter key to Save page or Submit form action
When using jQuery 's ajax method to submit form data, what is the best
I've created a login submit form in HTML but for some reason user/password autocompletion
I have a form with many input fields. When I catch the submit form
When I submit a form in HTML, I can pass a parameter multiple times,
JavaScript post request like a form submit shows you how to submit a form
I'm trying to submit a form with javascript. Firefox works fine but IE complains
I've been trying to submit a form with the FormPanel using the Action class
I'm wondering how can I submit a form via Ajax (using prototype framework) and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.