Jump to content

[SOLVED] I am trying to create edit form


ccrevcypsys

Recommended Posts

so i am trying to use $_GET to edit a form. But the get is not loading into the form.

this is the address that i have for it

localhost/index.php?act=artistConsole&events=events

and here is the address with the gets in them

localhost/index.php?act=artistConsole&events=events?eventname=Running%20With%20Chris%20Hansen?image=images/uploads/artist/tours/20070919303142_killthegods.gif?date=2007-09-18?time=08:00%20PM?city=Carson%20City?state=Nevada?building=Duffs%20House?address=3429%20S%20Carson%20City?price=10.00?purchase=4?info=KILL#content

What am i doing wrong.

heres the php code:

(the assign tells the {VAL_OTHER_EDIT} to be what ever is after the ,. Eg. $whatever->assign("SOMETHING","It is thist");

html

{SOMETHING}

web

It is thist)

<?php
	$artist_console->assign("EVENT_NAME",$_GET['event_name']);
	$artist_console->assign("EVENT_IMAGE","<img src='".$_GET['image']."' alt='".$_GET['event_name']."' title='".$_GET['event_name']."'>");
	$artist_console->assign("EVENT_DATE",$_GET['date']);
	$artist_console->assign("EVENT_TIME",$_GET['time']);
	$artist_console->assign("EVENT_PRICE",$_GET['price']);
	$artist_console->assign("EVENT_INFO",$_GET['info']);
	$artist_console->assign("EVENT_CITY",$_GET['city']);
	$artist_console->assign("EVENT_STATE",$_GET['state']);
	$artist_console->assign("EVENT_BUILDING",$_GET['building']);
	$artist_console->assign("EVENT_ADDRESS",$_GET['address']);
	$artist_console->assign("EVENT_PURCHASE",$_GET['purchase']);
$artist_console->assign("VAL_OTHER_EDIT","index.php?act=artistConsole&events=events?eventname=".$other_events_loop[$i]['event_name']."?image=".$other_events_loop[$i]['image']."?date=".$other_events_loop[$i]['date']."?time=".$other_events_loop[$i]['time']."?city=".$other_events_loop[$i]['city']."?state=".$other_events_loop[$i]['state']."?building=".$other_events_loop[$i]['building']."?address=".$other_events_loop[$i]['address']."?price=".$other_events_loop[$i]['price']."?purchase=".$other_events_loop[$i]['id']."?info=".$other_events_loop[$i]['info']."#content");	

//HTML PART. TABLE CODE
?>
        <form name="EventsForm" method="post" action="index.php?act=artistConsole&events=events#content" enctype="multipart/form-data">
              <table border="0" style="width:100%; float:left; font-size:12px">
            	<tbody>
                 <tr>
                  <td width="30%">Event Name:</td>
                  <td width="70%" align="left"><input name="event_name" type="text" class="textbox" size="30" value="{EVENT_NAME}" tabindex="1" /></td>
                 </tr>
                 <tr>
                  <td width="30%">Image:</td>
                  <td width="70%" align="left">{EVENT_IMAGE}<br /><input name="image" type="file" class="textbox" size="30" value="" tabindex="2" /></td>
                 </tr>
                 <tr>
                  <td>Date:YYYY-MM-DD</td>
                  <td><input name="date" type="text" class="textbox" id="label" size="12" value="{EVENT_DATE}" tabindex="3" /></td>
                 </tr>
                 <tr>
                  <td>Time:HH:MM AM/PM</td>
                  <td><input name="time" type="text" class="textbox" id="label" size="12" value="{EVENT_TIME}" tabindex="4" /></td>
                 </tr>
                 <tr>
                  <td>Location:</td>
                  <td>
                  <p style="margin:5px; background:#FFFFFF; color:#000099">City: <input name="city" type="text" class="textbox" size="15" value="{EVENT_CITY}" tabindex="5" /></p>
                  <p style="margin:5px; background:#FFFFFF; color:#000099">State: <input name="state" type="text" class="textbox" size="15" value="{EVENT_STATE}" tabindex="6" /></p>
                  <p style="margin:5px; background:#FFFFFF; color:#000099">Building: <input name="building" type="text" class="textbox" size="15" value="{EVENT_BUILDING}" tabindex="7" /></p>
                  <p style="margin:5px; background:#FFFFFF; color:#000099">Address: <input name="address" type="text" class="textbox" size="15" value="{EVENT_ADDRESS}" tabindex="8" /></p>
                  </td>
                 </tr>
                 <tr>
                  <td>Price:</td>
                  <td><input name="price" type="text" class="textbox" size="10" value="{EVENT_PRICE}" tabindex="9" /></td>
                 </tr>
                 <tr>
                  <td>Url For Purchase:</td>
                  <td><input name="purchase" type="text" class="textbox" size="30" value="{EVENT_PURCHASE}" tabindex="10" /></td>
                 </tr>
                 <tr>
                  <td>Info:</td>
                  <td><textarea name="info" class="textbox" cols="30" tabindex="11" />{EVENT_INFO}</textarea></td>
                 </tr>
                <tr>
                <td><a href="javascript:submitDoc('EventsForm');" class="txtCheckout" tabindex="12">Submit</a></td>
                </tr>
                </tbody>
            </table>
            </div>
</form>

Link to comment
https://forums.phpfreaks.com/topic/70500-solved-i-am-trying-to-create-edit-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.