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 6827207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:14:20+00:00 2026-05-26T22:14:20+00:00

I currently have this code in the page/div when you load it without anything

  • 0

I currently have this code in the page/div when you load it without anything in the url bar (a.k.a just index.php)

<?php echo"<h1>For all of your Citation needs!</h1>

<div >

<p>

This page is for any citations you would need to make for reports or essays. Once you enter in the needed information for your sourse, it will spit out the citations in <a href='http://owl.english.purdue.edu/owl/resource/747/01/'>MLA</a> &amp; <a href='http://owl.english.purdue.edu/owl/resource/560/01/'>APA</a> format.</p>
<p >In development is a system where your citations are stored in a database and everytime you make a new one, you will be given related reference material to help your research. Also available soon will be the ability to look up references using related fields such as:</p>

<ul>
<li>Authors</li>
<li>Ttile of Work</li>
<li>Publishing Company</li>
<li>Journal Publisher</li>
<li>Academic Source</li>
<li>Something else will go here</li>
</ul>


</div>";  ?>

When I click a link on the site to load different form data (index.php?form=book), I want that form data to take place of the stuff already in that div…for example:

<?php
switch ($_GET['form'])
{
    case 'book':
        ?>
        <form method="POST" action="thispage.php">
            <input name="" type="text" value="fghfghfghfghfghfh" />
        </form>
        <?
        break;
    case 'b': // show form b
        ?>
        <form method="POST" action="thispage.php">
            <!-- form b elements here :) -->
        </form>
        <?
        break;
    case 'c': // show form c
        ?>
        <form method="POST" action="thispage.php">
            <!-- form c elements here :) -->
        </form>
        <?
        break;
}
?>

Is there a way to have ^THIS^ block of PHP code take the place of the other block of php code when in the page/div when you click the link to load the form data?

  • 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-26T22:14:21+00:00Added an answer on May 26, 2026 at 10:14 pm

    Add the first block of “code” as the default for your switch statement. There are much better ways of building your page, though…

    PHP manual for switch: http://php.net/manual/en/control-structures.switch.php

    EDIT: Sample of your code, updated:

    <?php
        switch ($_GET['form'])
        {
            case 'book':
                ?>
                <form method="POST" action="thispage.php">
                    <input name="" type="text" value="fghfghfghfghfghfh" />
                </form>
                <?
                break;
            case 'b': // show form b
                ?>
                <form method="POST" action="thispage.php">
                    <!-- form b elements here :) -->
                </form>
                <?
                break;
            case 'c': // show form c
                ?>
                <form method="POST" action="thispage.php">
                    <!-- form c elements here :) -->
                </form>
                <?
                break;
            default:
                echo "<h1>For all of your Citation needs!</h1>
    
                    <div >
    
                    <p>
    
                    This page is for any citations you would need to make for reports or essays. Once you enter in the needed information for your sourse, it will spit out the citations in <a href='http://owl.english.purdue.edu/owl/resource/747/01/'>MLA</a> &amp; <a href='http://owl.english.purdue.edu/owl/resource/560/01/'>APA</a> format.</p>
                    <p >In development is a system where your citations are stored in a database and everytime you make a new one, you will be given related reference material to help your research. Also available soon will be the ability to look up references using related fields such as:</p>
    
                    <ul>
                    <li>Authors</li>
                    <li>Ttile of Work</li>
                    <li>Publishing Company</li>
                    <li>Journal Publisher</li>
                    <li>Academic Source</li>
                    <li>Something else will go here</li>
                    </ul>
    
    
                    </div>";
                    break;
        }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
Using dotnet 2.0. I currently have code like this : DataView dv = new
Is there a better way to do this jquery code? Currently I have to
There is probably is simple fix for this but I currently have code similar
I Have this code : MainPage.cs public class MainPage : System.Web.UI.Page { public string
Let's say I have this code: <div id=content> </div> and I use a simple
I have this code: Dim pathString As String = HttpContext.Current.Request.MapPath(Banking.mdb) Dim odbconBanking As New
As a beginner in Ocaml, I have this current working code: ... let ch_in
I have trouble finding way to correctly refactor this code so that there would
I am having a bit of difficulty with this current code I have set

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.