liamloveslearning Posted May 24, 2008 Share Posted May 24, 2008 hey everyone, im having major trouble with my message member button on a member profile page, the problem being in which i have no clue at all in how to redirect the member_id to the mail compose page sorry if this appears boneidle to most i just have no idea and so thanks to anybody who can help <?php require_once('Connections/.php'); ?> <?php // Load the common classes require_once('includes/common/KT_common.php'); // Load the tNG classes require_once('includes/tng/tNG.inc.php'); // Make a transaction dispatcher instance $tNGs = new tNG_dispatcher(""); // Make unified connection variable $conn_db99 = new KT_connection($db99, $database_db99); //Start Restrict Access To Page $restrict = new tNG_RestrictAccess($conn_db99, ""); //Grand Levels: Level $restrict->addLevel("1"); $restrict->Execute(); //End Restrict Access To Page if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $colname_member_profile_info_address = "-1"; if (isset($_GET['member_id'])) { $colname_member_profile_info_address = $_GET['member_id']; } mysql_select_db($database_db99, $db99); $query_member_profile_info_address = sprintf("SELECT profile_address, profile_postcode FROM member_profile WHERE profile_member_id = %s", GetSQLValueString($colname_member_profile_info_address, "text")); $member_profile_info_address = mysql_query($query_member_profile_info_address, $db99) or die(mysql_error()); $row_member_profile_info_address = mysql_fetch_assoc($member_profile_info_address); $totalRows_member_profile_info_address = mysql_num_rows($member_profile_info_address); $colname_member_profile_info_name = "-1"; if (isset($_GET['member_id'])) { $colname_member_profile_info_name = $_GET['member_id']; } mysql_select_db($database_db99, $db99); $query_member_profile_info_name = sprintf("SELECT member_firstname, member_lastname, member_mobiletelephone, member_landline, members.member_email FROM members WHERE member_id = %s", GetSQLValueString($colname_member_profile_info_name, "int")); $member_profile_info_name = mysql_query($query_member_profile_info_name, $db99) or die(mysql_error()); $row_member_profile_info_name = mysql_fetch_assoc($member_profile_info_name); $totalRows_member_profile_info_name = mysql_num_rows($member_profile_info_name); $colname_profile_info = "-1"; if (isset($_GET['member_id'])) { $colname_profile_info = $_GET['member_id']; } mysql_select_db($database_db99, $db99); $query_profile_info = sprintf("SELECT profile_selfsummary, profile_certifications, profile_licenses, profile_paymentterms, profile_educatonal_background, profile_workonsite, profile_rate, profile_expertise, profile_misc FROM member_profile WHERE profile_member_id = %s", GetSQLValueString($colname_profile_info, "text")); $profile_info = mysql_query($query_profile_info, $db99) or die(mysql_error()); $row_profile_info = mysql_fetch_assoc($profile_info); $totalRows_profile_info = mysql_num_rows($profile_info); $colname_get_expertise = "-1"; if (isset($_GET['member_id'])) { $colname_get_expertise = $_GET['member_id']; } mysql_select_db($database_db99, $db99); $query_get_expertise = sprintf("SELECT profile_expertise, expertise_subcategory.expertise_subcategory_name FROM member_profile, expertise_subcategory WHERE profile_member_id = %s ORDER BY expertise_subcategory.expertise_subcategory_name ASC", GetSQLValueString($colname_get_expertise, "text")); $get_expertise = mysql_query($query_get_expertise, $db99) or die(mysql_error()); $row_get_expertise = mysql_fetch_assoc($get_expertise); $totalRows_get_expertise = mysql_num_rows($get_expertise); $colname_avatar = "-1"; if (isset($_GET['member_id'])) { $colname_avatar = $_GET['member_id']; } mysql_select_db($database_db99, $db99); $query_avatar = sprintf("SELECT member_avatar FROM members WHERE member_id = %s", GetSQLValueString($colname_avatar, "int")); $avatar = mysql_query($query_avatar, $db99) or die(mysql_error()); $row_avatar = mysql_fetch_assoc($avatar); $totalRows_avatar = mysql_num_rows($avatar); // Make a logout transaction instance $logoutTransaction = new tNG_logoutTransaction($conn_db99); $tNGs->addTransaction($logoutTransaction); // Register triggers $logoutTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "GET", "KT_logout_now"); $logoutTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "index.php"); // Add columns // End of logout transaction instance // Execute all the registered transactions $tNGs->executeTransactions(); // Get the transaction recordset $rscustom = $tNGs->getRecordset("custom"); $row_rscustom = mysql_fetch_assoc($rscustom); $totalRows_rscustom = mysql_num_rows($rscustom); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>99Jobs.co.uk ©</title> <style type="text/css"> body { margin:0; } .style2 { color: #666666; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; } .featuredtext { font-size: 12px; font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; color: #333333; } .Headertext { font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: bolder; color: #FFFFFF; } .welcometable { border: 1px solid #999999; } .intro_text { font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-style: normal; font-weight: bolder; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: 0; border-right-style: 0; border-bottom-style: 0; border-left-style: 0; } .intro_text { font-family: Arial, Helvetica, sans-serif; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; } .logreg { font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bolder; color: #666666; text-decoration: underline; } .links { font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-style: normal; font-weight: normal; color: #FFFFFF; } .cpcontent { border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; } .profilehdr_members { font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; color: #3B5A9A; } .cpcontenttop { border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: solid; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; } .cpcontentleft { border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: solid; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; } .text1 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; } .info_table { background-attachment: fixed; background-image: url(images/corner2.gif); background-repeat: no-repeat; background-position: left top; } .cplinks { border-top-width: thin; border-right-width: thin; border-bottom-width: thin; border-left-width: thin; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: #999999; border-right-color: #999999; border-bottom-color: #999999; border-left-color: #999999; } .profilehdr { font-family: Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; color: #3B5A9A; } .avatar_text { font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #666666; } </style> <script type="text/javascript"> <!-- function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } //--> </script> <link href="includes/skins/mxkollection3.css" rel="stylesheet" type="text/css" media="all" /> <script src="includes/common/js/base.js" type="text/javascript"></script> <script src="includes/common/js/utility.js" type="text/javascript"></script> <script src="includes/skins/style.js" type="text/javascript"></script> <link href="styles.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .info_table { background-attachment: fixed; background-image: url(images/corner2.gif); background-repeat: no-repeat; background-position: left top; } .hdrs_listings_jobs { color: #666666; font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 12px; } .membertext { font-size: 12px; font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; color: #666666; padding-left: 5px; padding-right: -5px; } --> </style> </head> <BODY MARGINWIDTH="0" MARGINHEIGHT="0"> <?php include'member_header.php';?> <table width="800" height="81" border="0" align="center" cellpadding="0" cellspacing="0" vspace="0"> <tr> <td width="269" height="52" align="center" valign="middle"><div align="left"> <p> <?php // Show IF Conditional region2 if (@$_SESSION['kt_login_user'] == "") { ?> <a href="index.php"><img src="images/logo.gif" alt="" width="149" height="35" hspace="5" border="0" usemap="#MapMap" /></a> <?php // else Conditional region2 } else { ?> <a href="member_area.php"><img src="images/logo.gif" alt="" width="149" height="35" hspace="5" border="0" usemap="#MapMap" /></a> <?php } // endif Conditional region2 ?> </p> </div></td> </tr> <tr> <td height="29" align="center" valign="middle"><?php include'navbar.php';?></td> </tr> </table> <br /> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="profilehdr">Personal information</td> </tr> </table> <br /> <table width="800" height="234" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="28" height="234" valign="top" bgcolor="#F1F1F1"><img src="images/corner2.gif" width="28" height="15" /></td> <td width="447" valign="top" bgcolor="#F1F1F1" class="featuredtext"><br /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="25%" align="right" valign="top" class="featuredtext">Username</td> <td width="2%" rowspan="3" valign="top" class="header"> </td> <td width="73%" valign="top" class="header"><?php echo $row_member_profile_info_name['member_email']; ?></td> </tr> <tr> <td height="20" align="right" valign="top" class="featuredtext"> </td> <td width="73%" valign="top" class="header"> </td> </tr> <tr> <td align="right" valign="top" class="featuredtext">Name</td> <td width="73%" valign="top" class="header"><?php echo $row_member_profile_info_name['member_firstname']; ?> <?php echo $row_member_profile_info_name['member_lastname']; ?></td> </tr> <tr> <td height="20" align="right" valign="top" class="featuredtext"> </td> <td height="20" valign="top" class="header"> </td> <td width="73%" valign="top" class="header"> </td> </tr> <tr> <td align="right" valign="top" class="featuredtext">Contact Address</td> <td valign="top" class="header"> </td> <td rowspan="2" valign="top" class="header"><?php echo $row_member_profile_info_address['profile_address']; ?></td> </tr> <tr> <td height="20" align="right" valign="top" class="featuredtext"> </td> <td height="20" valign="top" class="header"> </td> </tr> <tr> <td align="right" valign="top" class="featuredtext">Postcode</td> <td valign="top" class="header"> </td> <td rowspan="2" valign="top" class="header"><?php echo $row_member_profile_info_address['profile_postcode']; ?></td> </tr> <tr> <td height="20" align="right" valign="top" class="featuredtext"> </td> <td height="20" valign="top" class="header"> </td> </tr> <tr> <td align="right" valign="top" class="featuredtext">Contact Landline</td> <td valign="top" class="header"> </td> <td rowspan="2" valign="top" class="header"><?php echo $row_member_profile_info_name['member_landline']; ?></td> </tr> <tr> <td height="20" align="right" valign="top" class="featuredtext"> </td> <td height="20" valign="top" class="header"> </td> </tr> <tr> <td align="right" valign="top" class="featuredtext">Contact Mobile </td> <td valign="top" class="header"> </td> <td valign="top" class="header"><?php echo $row_member_profile_info_name['member_mobiletelephone']; ?></td> </tr> <tr> <td height="15" colspan="3" valign="top" class="header"> </td> </tr> </table> </td> <td width="20" valign="top" bgcolor="#FFFFFF" class="featuredtext"> </td> <td width="305" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"><img src="images/corner2.gif" alt="" width="28" height="15" vspace="0" /> <br /> <br /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"> <?php // Show IF Conditional region3 if (@$row_avatar['member_avatar'] == "") { ?> <img src="images/no_pic.gif" alt="no_pic" width="133" height="133" /> <?php // else Conditional region3 } else { ?> <img src="avatars/<?php echo $row_avatar['member_avatar']; ?>" alt="" /> <?php } // endif Conditional region3 ?> </div></td> </tr> <tr> <td> </td> </tr> <tr> <td class="avatar_text"><form id="form1" name="form1" method="post" action="mail_pro_compose.php?member_id="> <label> <div align="center"> <input name="message_member" type="submit" class="reg_button" id="message_member" value="Message Member" /> </div> </label> </form> </td> </tr> </table> <p><br /> </p></td></tr> </table> <br /> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="profilehdr">Who am I?</td> </tr> </table> <br /> <table width="800" height="49" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="28" height="49" align="left" valign="top" bgcolor="#F1F1F1"><img src="images/corner2.gif" alt="" width="28" height="15" /></td> <td width="368" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> <p>Self summary </p> <p class="header"><?php echo $row_profile_info['profile_selfsummary']; ?></p></td> <td width="36" align="left" valign="top" bgcolor="#F1F1F1"></td> <td width="368" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> <p>Additional information</p> <span class="header"><?php echo $row_profile_info['profile_misc']; ?></span><br /></td> </tr> </table> <br /> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="profilehdr">Details</td> </tr> </table> <br /> <table width="800" height="142" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="28" height="49" rowspan="8" align="left" valign="top" bgcolor="#F1F1F1"><img src="images/corner2.gif" alt="" width="28" height="15" /></td> <td width="142" height="15" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext"><p>Willing to work on-site?</p> </td> <td width="15" rowspan="2" align="left" valign="middle" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="219" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="header"><?php // Show IF Conditional region2 if (@$row_profile_info['profile_workonsite'] == 1) { ?> <p> Yes<?php // else Conditional region2 } else { ?> No</p> <?php } // endif Conditional region2 ?></td> <td width="10" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="114" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext"><p>Your certifications</p></td> <td width="13" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="259" align="left" valign="top" bgcolor="#F1F1F1" class="header"><p><?php echo $row_profile_info['profile_certifications']; ?></p></td> </tr> <tr> <td height="0" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="114" height="5" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="259" height="5" align="left" valign="top" bgcolor="#F1F1F1" class="header"> </td> </tr> <tr> <td height="9" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext">Minimum rate</td> <td width="15" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="219" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="header"><?php echo $row_profile_info['profile_rate']; ?></td> <td width="10" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="114" rowspan="2" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext">Your licenses</td> <td width="13" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="259" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="header"><?php echo $row_profile_info['profile_licenses']; ?></td> </tr> <tr> <td height="10" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> </tr> <tr> <td align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext">Payment terms</td> <td width="15" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="219" align="left" valign="top" bgcolor="#F1F1F1" class="header"><?php echo $row_profile_info['profile_paymentterms']; ?></td> <td width="10" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="114" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext">Education</td> <td width="13" align="left" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td width="259" align="left" valign="top" bgcolor="#F1F1F1" class="header"><?php echo $row_profile_info['profile_educatonal_background']; ?></td> </tr> <tr> <td height="10" colspan="7" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> </tr> <tr> <td height="10" colspan="4" rowspan="2" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td height="5" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext">Expertise</td> <td height="10" rowspan="2" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> <td height="10" rowspan="2" align="left" valign="top" bgcolor="#F1F1F1" class="header"><?php do { ?> <?php echo ucwords($row_get_expertise['expertise_subcategory_name']); ?>, <?php } while ($row_get_expertise = mysql_fetch_assoc($get_expertise)); ?></td> </tr> <tr> <td height="20" align="right" valign="top" bgcolor="#F1F1F1" class="featuredtext"> </td> </tr> </table> <br /> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="profilehdr">Feedback history</td> </tr> </table> <br /> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1"> <tr> <td valign="top"><img src="images/corner2.gif" alt="" width="28" height="15" /></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> <p><br /> </p> <p align="center"> <span class="style2">Copyright © 2008 | 99jobs.co.uk</span></p> </body> </html> <?php mysql_free_result($member_profile_info_address); mysql_free_result($member_profile_info_name); mysql_free_result($profile_info); mysql_free_result($get_expertise); mysql_free_result($avatar); ?> heres what im currently trying to no avail however <tr> <td class="avatar_text"><form id="form1" name="form1" method="post" action="mail_pro_compose.php?member_id="> <label> <div align="center"> <input name="message_member" type="submit" class="reg_button" id="message_member" value="Message Member" /> </div> </label> </form> </td> </tr> Link to comment https://forums.phpfreaks.com/topic/107068-how-do-i-know-which-member-id/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.