49636649e83db1c047c9fc9644d99940

Hi, i've been searching the internet for ages, and thought i was getting somewhere. I'm trying to link in a drop down menu that will change the size of the table depending on which options are selected. If '1' is selected then there will be one row in the table. If '2' is selected then there will be two rows for people to fill in etc. etc. I don't really know what i'm doing with the coding. Any help to correct or completely change what i've got would be helpful! Thanks in advance :-)

<html>

<body>

<font size="3">These are the Medicines that I am currently taking:</font>
<form method=post action="/cgi-bin/example.cgi">
Select an option:
<select>
<option selected>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select><input type="Submit" value="Submit"></form>

<?php
$d=option("O");
if ($o=="1") { ?>
 <div align="center">
<table cellpadding="2" cellspacing="2" width="100%">
<tr>
<td bgcolor="#cccccc">Name of Medicine</td>
	<td bgcolor="#cccccc">Dose</td>
	<td bgcolor="#cccccc">Format (tablet etc)</td>
	<td bgcolor="#cccccc">When I take it</td>
	<td bgcolor="#cccccc">What I take it for</td>
	</tr>
<tr>
<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	</tr></table>

<?php }
$d=option("O");
if ($o=="2") { ?>
 <div align="center">
<table cellpadding="2" cellspacing="2" width="100%">
<tr>
<td bgcolor="#cccccc">Name of Medicine</td>
	<td bgcolor="#cccccc">Dose</td>
	<td bgcolor="#cccccc">Format (tablet etc)</td>
	<td bgcolor="#cccccc">When I take it</td>
	<td bgcolor="#cccccc">What I take it for</td>
	</tr>
<tr>
<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	</tr>
<tr>
<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	<td><form method=post action="/cgi-bin/example.cgi"><input type="text" size="20" maxlength="30"></form></td>
	</tr></table>
<?php } ?>

</body>

</html>

Refactorings

No refactoring yet !

D41d8cd98f00b204e9800998ecf8427e

31337

July 22, 2009, July 22, 2009 18:01, permalink

No rating. Login to rate!

Time to cram a 20 minutes PHP quick start guide and read through the PHP manual.

D41d8cd98f00b204e9800998ecf8427e

Andrea

January 27, 2011, January 27, 2011 07:14, permalink

No rating. Login to rate!
Ab67e65f2a1ae300ca0cffdba3b8f71b

Pounteeatrord

November 23, 2011, November 23, 2011 23:19, permalink

No rating. Login to rate!

Hi guys,

i curiosity be sure what in your conviction is a attractive tube purlieus in search iphone/android dev.
i demand catch a glimpse of a enormous numbers of install that only offer minute preview and pray as a remedy for a subscrtiption...

ie: bang you later.com or stuff like that...

put 'reward division'

this united
<a href=http://mobile.pornhub4u.com/>http://mobile.pornhub4u.com/</a> but i am not able to seek the movie (maybe is just the galaxy s that isn'a able)


doesn't signify anything about steep

D9be5af5acc58e68400457188810ebc7

allkahovbdua

March 2, 2012, March 02, 2012 08:26, permalink

No rating. Login to rate!

Just leave it us it is a1l3lbd5tes77tdlpr2702

A972a4a2d8ff8bd8242a0477de671707

Foermmayomo

January 1, 2012, January 01, 2012 00:38, permalink

No rating. Login to rate!

Wow, Amazing thread!

Your refactoring





Format Copy from initial code

or Cancel