Jump to content

Recommended Posts

i do this below to display picture and details

the allignment is like this

 

pic

area

price

BIG BUTTON

 

is it a good way to pass value as hidden in the form?? cos if i use form  button.. it display a big button there.. anyway to minimise the button??

 

or u think better to change the button to word? if in word how to pass value

 

thansk for advice

 

 

 

if($row[photo1]!="")
			{
				echo'<td>';
				echo"<img src=art/{$row[photo1]} height=100 width=130>";
				echo'<br>';


				echo "$row[area]";
				echo'<br>';
				echo "Rm "."$row[selling_price]";
				echo "<br>";
				echo'<form action=post-premiumreview.php method=post>';
				echo"<input type=submit name=submit value='View Property $row[premPropertyID]'>";
				echo"<input type=hidden name=id value=$row[premPropertyID]>";

				echo'<form>';
				echo'</td>';
			}	

Link to comment
https://forums.phpfreaks.com/topic/73039-ugly-allignment/
Share on other sites

that should output

 

View plus the first 4 or so letters of the property

 

 

<?php

echo'<input type=hidden name=id value='.substr($row[premPropertyID],4).'>';
echo'<input type=submit name=submit value=View' .substr($row[premPropertyID],4).'>';

?>

Link to comment
https://forums.phpfreaks.com/topic/73039-ugly-allignment/#findComment-368400
Share on other sites

what i did was make it so it listed the first 4 letters of the property id plus view

 

<?php

echo'<input type=hidden name=id value=View'.substr($row[premPropertyID],4).'>';
echo'<input type=submit name=submit value=View' .substr($row[premPropertyID],4).'>';

?>

Link to comment
https://forums.phpfreaks.com/topic/73039-ugly-allignment/#findComment-368412
Share on other sites

thats the CSS style to reduce the width of the button

 

 

Edit: modify the width in the CSS style until it is the desired width

 

 

<STYLE type="text/css">
button-standard{
WIDTH: 100px;}
</STYLE>
<?php

echo'<input type=hidden name=id style=button-standard
value=View'.substr($row[premPropertyID],4).'>';
echo'<input type=submit name=submit style=button-standard 
value=View' .substr($row[premPropertyID],4).'>';

?>

Link to comment
https://forums.phpfreaks.com/topic/73039-ugly-allignment/#findComment-368435
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.