473,480 Members | 4,939 Online
Bytes | Software Development & Data Engineering Community
Create 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="ithardwareadd.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"><input class="button" onmouseover="this.className='button btnhov'" onmouseout="this.className='button'" type="submit" value= "<?php echo '$rowssoftware[9]';?>" ></td>
<td>
</form>
</td>
</table>
</form>
</td>
[/PHP]
Nov 22 '07 #1
1 1423
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"><input class="button" onmouseover="this.className='button btnhov'" onmouseout="this.className='button'" 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="ithardwareadd.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"><input class="button" onmouseover="this.className='button btnhov'" onmouseout="this.className='button'" 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
8161
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...
1
4295
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...
9
1191
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...
2
3116
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...
2
9507
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...
0
1388
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...
1
1592
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...
1
2705
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...
1
2248
by: johnjsforum | last post by:
Buddies, I have a web page to create HTML buttons dynamically as in the “formDivColorPicker” function ////////////////////////////////////////////////////////////////////////////////////...
0
6905
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...
0
7041
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,...
1
6736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5331
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,...
0
4478
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...
0
2994
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
561
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.