form post post.php (example)
<input name="txtweb" type="text" id="email2" size="30" value="<?= $_REQUEST['email'] ?>">
post.php
$sql = "INSERT INTO community_cat_listing (community_id, url, name, description, community_category,"
. " email, contact_first_name, use_first_name, contact_last_name, use_last_name, contact_phone,"
. " use_phone, contact_cell_phone, use_cell_phone, contact_email, use_email, contact_fax, use_fax,"
. " start_date, end_date, associate_id) VALUES (" . $_REQUEST['selCom'] . ",'"
. $_REQUEST['txtweb'] . "','" . $_REQUEST['eventname'] . "','" . $_REQUEST['text'] . "',"
. $_REQUEST['listing_cat'] . ",'" . $_REQUEST['email'] . "','" . $_REQUEST['first_name'] . "','"
. $_REQUEST['usefirst'] . "','" . $_REQUEST['last_name'] . "','" . $_REQUEST['uselast'] . "','"
. $_REQUEST['phone_area'] . $_REQUEST['phone_middle'] . $_REQUEST['phone_end'] . "','" . $_REQUEST['usephone']
. "','" . $_REQUEST['cell_area'] . $_REQUEST['cell_middle'] . $_REQUEST['cell_end'] . "','" . $_REQUEST['usecell']
. "','" . $_REQUEST['email'] . "','" . $_REQUEST['useemail'] . "','" . $_REQUEST['fax_area'] . $_REQUEST['fax_middle']
. $_REQUEST['fax_end'] . "','" . $_REQUEST['usefax'] . "','" . $start_date . "','" . $end_date
. "'," . $_SESSION['valid_user_id'] . ")";
$result = $dbq->Run_SQL($sql);
website is in there... posts just fine
posts to temp table as (exp) www.msn.com
puts in just fine..
when user decides to buy the listing, it comes out of the temp table and goes into main product table. also inserts and queries just fine.. no changes to the link...
then i run the query to pull that data:
$qry = new DBQuery();
$result = $qry->qryEventByID($_REQUEST['eid']);
IF (!$result) print "Query Event By ID Select Query Failed<br>";
ELSE
{
$row = mysql_fetch_array($result);
}
~ here's the actual query ~
function qryEventByID( $id )
{
IF ( $this->DBconnect() )
{
$today = date("Y-m-d");
$sql = "SELECT ccl.url, ccl.name event_name, ccl.description, ccl.email, ccl.contact_first_name, ccl.use_first_name,"
. " ccl.contact_last_name, ccl.use_last_name, ccl.contact_phone, ccl.use_phone, ccl.contact_cell_phone,"
. " ccl.use_cell_phone, ccl.contact_email, ccl.use_email, ccl.contact_fax, ccl.use_fax, ccl.start_date,"
. " ccl.end_date, ce.admission, ce.building_area, ce.street, ce.city, ce.state, ce.zip, ce.zip_plus,"
. " ce.from_date, ce.to_date, ce.from_time, ce.to_time, cat.name category_name"
. " FROM community_cat_listing ccl, community_events ce, community c, categories cat"
. " WHERE ccl.id = ce.community_cat_listing_id "
. " AND c.id = ccl.community_id AND cat.id = ccl.community_category"
. " AND ccl.id = " . $id;
$result1 = mysql_query($sql);
IF ( !$result1 ) RETURN FALSE;
RETURN $result1;
}
else
{
print "NO CONNECT";
RETURN FALSE;
}
}
~~ end function ~~
then to print it:
<? $row['url'] > "" ? print $fontblack . "<a href=\"" . $row['url'] . "\" target=\"_blank\">" . $row['url'] . "</a>$end" : print $fontblack . 'no website availabe' . $end; ?>
and it prints as
http://localhost.com/www.msn.com
you asked for the code 😛