473,800 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP buttons and variables

15 New Member
Hi,

I am trying to display a variable on a button, but i just cant find a way of doing this, can anyone help? (line 9 where value =)


[PHP]
</table>
<td>
<form action="ithardw areadd.php" method="GET">
<table border="0">
<tr>
<td><input type="hidden" name="jobid" value="<?php echo $jobid?>"></td>
<td><input type="hidden" name="equid" value="<?php echo $equid?>"></td>
<td><input type="hidden" name="userid" value="<?php echo $userid?>"></td>
<td colspan="2"><in put class="button" onmouseover="th is.className='b utton btnhov'" onmouseout="thi s.className='bu tton'" type="submit" value= "<?php echo '$rowssoftware[9]';?>" ></td>
<td>
</form>
</td>
</table>
</form>
</td>
[/PHP]
Nov 22 '07 #1
1 1433
robin1983
99 New Member
The problem is in your code, because you did not terminate the php, you forgot to give ";" . <?php echo $jobid; ?>

[PHP] <table border="0">
<tr>
<td><input type="hidden" name="jobid" value="<?php echo $jobid; ?>"></td>
<td><input type="hidden" name="equid" value="<?php echo $equid; ?>"></td>
<td><input type="hidden" name="userid" value="<?php echo $userid; ?>"></td>
<td colspan="2"><in put class="button" onmouseover="th is.className='b utton btnhov'" onmouseout="thi s.className='bu tton'" type="submit" value= "<?php echo '$rowssoftware[9]';?>" ></td>
<td>
</form>
</td>
</table>[/PHP]
but, you dont show where u assign the variable. ok try this i think it will work

Hi,

I am trying to display a variable on a button, but i just cant find a way of doing this, can anyone help? (line 9 where value =)


[PHP]
</table>
<td>
<form action="ithardw areadd.php" method="GET">
[PHP]<table border="0">
<tr>
<td><input type="hidden" name="jobid" value="<?php echo $jobid?>"></td>
<td><input type="hidden" name="equid" value="<?php echo $equid?>"></td>
<td><input type="hidden" name="userid" value="<?php echo $userid?>"></td>
<td colspan="2"><in put class="button" onmouseover="th is.className='b utton btnhov'" onmouseout="thi s.className='bu tton'" type="submit" value= "<?php echo '$rowssoftware[9]';?>" ></td>
<td>
</form>
</td>
</table>
</form>
</td>
[/PHP]
Nov 22 '07 #2

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

Similar topics

2
8177
by: Newbie | last post by:
I currently have a set of simple calculations to determine square footage and multuply that by a dollar amount per foot. I use form fields that are filled in by the user, and then the Submit button opens the asp page that returns the result of the calculation. What I would like to do is add certain numbers to the total based on radio buttons or checkboxes that the user activates on the form page. For instance, they enter the numbers into...
1
4312
by: Orest Kinasevych | last post by:
Okay, I made sense of the earlier suggestions and realized I was on the right track -- I appreciate the feedback which got me to this point. The suggestions posted here indeed worked and eliminated the JavaScript errors I was seeing. The fact that the target URL didn't execute was because certain variables weren't being passed to it. What I need to do is to pass a conditional variable to the target URL, when the form is submitted,...
9
1207
by: Krunom Ancini | last post by:
Hi, I have on my page something about 50 buttons that "user" should use only for loading some session-variables: click on the button -> session variables loaded and i wish that after click, clicked button changes his color and thats no problem. I use:
2
3156
by: Jeff | last post by:
I'm trying to create a dynamic form that can have multiple groups of radio buttons (each group has two buttons) with the same name. Essentially, the form allows a user to enter as many names as they want. If they need to add more, they click an "add name" button and the javascript inserts another row of input boxes. Each row should have two radio buttons to indicate sex (M F). When you have multiple text input boxes with the same...
2
9543
by: longtim | last post by:
I have been trying to implement navigation buttons for a number of forms in my application. Creating the 'Next' 'Previous' buttons has been fine but setting the enabled properties doesn't work due to problems with the BOF and EOF properites. They never appear to be set properly. Here is the offending code: private sub Form_Current()
0
1403
by: peter_bradley | last post by:
Hi all, Not sure if this is possible, but can I change the controls of a command button on a per record bases in a subform. In my case, I would like to make a command button visible only if certain fields in a table are a certain value. Here is the subroutine I've written so far: Public Sub IsButtonVisible() 'For Access, define some object variables and make connections.
1
1610
by: Jay | last post by:
I need to validate 21 sets of radio buttons before submission to the server for calculation and storage. Is it best to validate on the client side using javascript or to validate on the server using the code behind vbscript. It seems that natural to validate before submission. If javascript is the best then how do I the variables. I noticed some javascript that was dynamically created which looks like the following: ...
1
2747
by: Bill_W_Stephens | last post by:
I have a complicated page with several submit buttons. I don't want to create multiple forms because much of the input is shared and the code is getting very ugly. However I would like to determine which values will be submited. Here is a simplified example that may better illustrate my question. Or maybe there is a better approach... <SCRIPT language="JavaScript">
1
2284
by: johnjsforum | last post by:
Buddies, I have a web page to create HTML buttons dynamically as in the “formDivColorPicker” function //////////////////////////////////////////////////////////////////////////////////// version 1 : using global variables ////////////////////////////////////////////////////////////////// var _textField, _divColorPicker; // global vars window.onload = function() { _textField = document.getElementById('htxaMessage'); // fill...
0
9691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10507
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10279
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10036
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9092
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6815
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2948
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.