Jump to content

Recommended Posts

Hi Guys,

 

I have an area on my website where you can edit events. I have a dropdown, you select an option and it adds the variables into text boxes in the following way:

 

Add dropdown option:

function loop() {
//took long bits of code out

while ($row = mysql_fetch_assoc($result)) {
echo "<option value=\"".'home.htm?en='.$row['eventName'].'&ts='.$row['TicketsOnSale'].'&sp='.$row['TicketPrice'].'&id='.$row['eventid']."\">".$row['eventName']."</option>" . "\n\t\t";
}
}

 

*page refreshes*

 

Html:

	<form action="update.htm?id=update&action=event" name="event" method="post">
	<select id="menu" name="menu">
	Select Event to Edit:
	<option value="">- Select -</option>
	<?
		loop("update"); //Run loop function
	?><br />
	<label for="eventnm">Event Name:</label>
	<input type="text" name="eventnm" value="<? echo $_GET['en']; ?>" /><br />
	<label for="tickno">Number of tickets on sale:</label>
	<input type="text" name="tickno" value="<? echo $_GET['ts']; ?>" /><br />
	<label for="tickprice">Single ticket price:</label>
	<input type="text" name="tickprice" value="<? echo $_GET['sp']; ?>" /><br />
	<input type="hidden" name="id" value="<? echo $_GET['id']; ?>" />
	<input type="submit" value="Update >>"/></p>
</form>

 

Now the problem is, is I intend to add the description field too. The description field can be VERY VERY long and I don#t know if it is a good idea to put it to URL and use the $_GET method. What alternatives are there ?

Link to comment
https://forums.phpfreaks.com/topic/89004-description-field-problem/
Share on other sites

Well, I use a query to get the description field, this field can be extremely long. Once the javascript has finished and the query has finished the page automatically reloads and thus it loads the query into the URL, and I will have to use $_GET to get all the data. The problem is, is I don't think it is practical for me do this in such a method considering the size of such a field.

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.