473,382 Members | 1,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

<a> and nested <input> button not working as expected

Hi. I'm trying to use a link in a echo statement. The code below is currently in a if statement so that if a seat is free then a button is displayed to allow the user to proceed to pay for the seat. However the button doesn't work when clicked and I'm struggling to find out why. Any help would be much appreciated!


Expand|Select|Wrap|Line Numbers
  1.  
  2. echo "<a href=\"http://lst3002-15s1-web.ced.bolton.co.uk/~ed345/payment.html\"><input type=\"Submit\" value=\"Proceed to payment >>\">";
  3.  
  4.  
Dec 30 '10 #1

✓ answered by code green

For a start I would put the echo statement in single quotes and get rid of all the escapes. It is much cleaner
Expand|Select|Wrap|Line Numbers
  1. echo '<a href="http://lst3002-15s1-web.ced.bolton.co.uk/~ed345/payment.html">';
And I can see you have missed the closing </a>

7 1945
Markus
6,050 Expert 4TB
This isn't a PHP issue, but an HTML one. I'll move this thread over there.
Dec 30 '10 #2
JKing
1,206 Expert 1GB
What do you mean it doesn't work? What is it doing and what is it supposed to do?
Dec 30 '10 #3
code green
1,726 Expert 1GB
For a start I would put the echo statement in single quotes and get rid of all the escapes. It is much cleaner
Expand|Select|Wrap|Line Numbers
  1. echo '<a href="http://lst3002-15s1-web.ced.bolton.co.uk/~ed345/payment.html">';
And I can see you have missed the closing </a>
Dec 31 '10 #4
drhowarddrfine
7,435 Expert 4TB
You can't use an anchor and an input button at the same time.
Dec 31 '10 #5
Basically I want to display a button that will go back a page if a seat has been taken. And I want a different button to be displayed if a seat is free to allow the user to proceed to payment. So I'm trying to put a submit button that will allow the user to go back to the required page if the seat they have chosen has been taken. I am using an if statement for this
Dec 31 '10 #6
code green
1,726 Expert 1GB
So... does that mean you have solved it?
Jan 4 '11 #7
Hey guys,

Thanks for the advice I chose to echo the word and make it into a link.

Thanks
Jan 5 '11 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Igor | last post by:
Hello, i moved some scripts from one server to an other server (not my own, but on different service providers). The next script is not working anymore, i can't send a variable with a <a href>...
2
by: Gregor Horvath | last post by:
Hi, Before I reinvent the wheel I`d like to ask if someone has done this before since I did not find an advice at Google. The goal is to create a dynamic Tree View in HTML. Say I have a...
7
by: Jack | last post by:
Hi, I have the following piece of code:If RS.EOF or RS.BOF Then Session("Authenticated") = False Response.Write "Sorry, your userid or password did not match" Response.Write "<BR>"...
6
by: snacktime | last post by:
I've searched and searched and have not found a solution to suppress the margin on form or href tags so that there is no space before or after the tag. The only way I have found to do this is to...
5
by: specjal | last post by:
hi in form TEXTAREA i have text like: bla bla http://www.google.com/bla/bla/bla text text text text now how to make from this text like: bla bla text text text text
13
by: tperri | last post by:
I have an HTML table with several fields like this: <A href="Savings.aspx?category=Food"><asp:imagebutton id="imgFood" ImageUrl="images\buttons\btn-food-i.gif"...
1
by: rn5a | last post by:
Consider the following code: <script runat="server"> Sub Page_Load(obj As Object, ea As EventArgs) Dim sqlReader As SqlDataReader sqlReader = 'calling a function that returns SqlDataReader ...
3
by: ajaspersonal | last post by:
"i want to change font_style (hyper link<a href...>text</a>) normal to italics.when load a page" this is my problem but that label included in one 'USERCONTROL' This user controls may...
8
by: Prisoner at War | last post by:
Another weekend, another project, another problem.... Why should a perfectly fine function work only half-way through when called through onClick in an anchor tag?? The text fade-in script...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.