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

  • SEARCH
  • Home
  • 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 4101198
In Process

The Archive Base Latest Questions

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

Afternoon all, A very quick question… a friend has set up a form for

  • 0

Afternoon all,

A very quick question… a friend has set up a form for me using mysql_query. Since he wrote this, I have added an extra column into the database, which I want to pull through into the form.

However I can’t seem to get this extra column to appear (labelled Currency). The reason I need it is the query below will pulls back a value and the £ symbol. Because I want to display not only £, but also € prices, I need this extra column to pull through (obviously I will have to remove the £ from the echo below too).

I’ve tried adding the extra column (Currency) to the code, e.g. “SELECT Room, Currency, Price FROM Spa_Upgrades

but this hasn’t worked.

The code is:

 <?php 
            if (isset($id))
                {
                $query2 = mysql_query("SELECT Room, Price FROM Spa_Upgrades WHERE Spa_Upgrades.Spa_Id = '".$id."' AND Spa_Upgrades.Id = '".$pack."' order by Spa_Upgrades.Order");
                $rows = mysql_num_rows($query2);
                if($rows==0) {echo "disabled='disabled'/>";} 
                else
                    {
                    echo "/>";
                    echo "<option value='Default'>Please Select</option>";
                    for($i=0; $i<$rows; $i++)
                        {
                        $result2 = mysql_fetch_array($query2);
                        echo "<option value='".$result2[0]."&nbsp;&pound;".$result2[1]."pp'>$result2[0]&nbsp;&pound;$result2[1]pp</option>";
                        }
                    }
                }

Hugely grateful if someone can solve this!

Thanks,
Motley

  • 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:39:58+00:00Added an answer on May 20, 2026 at 8:39 pm

    Alter the query as follows:

    SELECT Room, Price, Currency FROM Spa_Upgrades ...
    

    Alter the line beginning echo inside the for loop: replace &pound; with $result2[2] wherever it appears. (Or if the Currency column doesn’t contain the HTML entity for the currency symbol, then replace &pound; with appropriate code to obtain the symbol from the Currency column entry.)

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

Sidebar

Related Questions

Afternoon all, Using the code below I'm trying to load what is render by
I've been trying to get this to work all afternoon and can't. I want
Afternoon all, I really need your help as this is a Nightmare! I was
Afternoon all. Another hour, another question! I have the following bit of jquery up
Very good afternoon to all, The problem I have now is that I can
This seems to have happened at some point this afternoon. First of all, my
I've been pulling my hair out on this one all afternoon. Basically, I have
I'm trying to solve this problem all afternoon but with no luck, hopefully someone
I have been trying to figure this out all afternoon with no luck. On
Afternoon all This is driving me nuts. For no apparent reason (of course there

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.