Jump to content

[SOLVED] HTML button


abch624

Recommended Posts

Hi there I want to use text as a button. If you have a look at the code bellow:

<form class="form" method="post" action="newaccount.php">
		<tr>
			<td width="150">				
				<input type="text" name="newaccountname" value="New Account" tabindex="3">
			</td>
			<td align="center" width="32">	<a href="/1STA/newaccount.php">add</a>
			</td>
			<td width="41"> 	
			</td>
			<td width="41"> 	
			</td>
		</tr>	<!-- PHP BEGIN -->
	</form>

 

I want to use the <a href="/1STA/newaccount.php">add</a> as a button so that the newaccountname is passed to the newaccount.php file.

 

At the moment this is not working and just goes to the newaccount.php path but the variable is not posted.

 

Please help...

Link to comment
Share on other sites

I have changed the code as per

<form class="form" method="post" name="newaccount" action="newaccount.php">
		<tr>
			<td width="150">				
				<input type="text" name="newaccountname" tabindex="3">
			</td>
			<td align="center" width="32">	<a href="#null" onclick="document.['newaccount'].submit(); return false">add</a>
			</td>
			<td width="41"> 	
			</td>
			<td width="41"> 	
			</td>
		</tr>	<!-- PHP BEGIN -->
	</form>

When I click on the add link the url changes to http://localhost/1STA/accountadmin.php#null and nothing happens.

 

Any help....

 

Cheers - Zahid

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.