Jump to content

Scotty13

Members
  • Posts

    34
  • Joined

  • Last visited

Scotty13's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Like this? if(!isset($passengerUserName)){ (!isset($passengerUserName)) = (!isset($passengerFirstName));} // If username is blank use the firstname programming changes in v1.32 call for thisLike this?
  2. I added (!isset($passengerUserName)) on line 362 and it removed the first error(Notice: Undefined variable: passengerFirstName in /home/**************/res.php on line 362) other errors still remain. Thanks for your help, new to all this.
  3. Error: Notice: Undefined variable: res.php on lines 362, 408, 412(Marked bold red below)Notice: Undefined variable: passengerUserName in /home/************/res.php on line 362Notice: Undefined variable: passengerFirstName in /home/************/res.php on line 362Notice: Undefined variable: puname in/home/************/res.php on line 408Notice: Undefined variable: pfname in /home/************/res.php on line 408Notice: Undefined variable: pcity in /home/************/res.php on line 412Notice: Undefined variable: pstate_province in /home/************/res.php on line 412Notice: Undefined variable: pcountry in /home/************/res.php on line 412 $sqlName = mysql_query("SELECT username, firstname FROM myMembers WHERE id='$value' LIMIT 1") or die ("Sorry we had a mysql error!"); while ($row = mysql_fetch_array($sqlName)) { $passengerUserName = substr($row["username"],0,12); $passengerFirstName = substr($row["firstname"],0,12);}362 if (!$passengerUserName) {$passengerUserName = $passengerFirstName;} // If username is blank use the firstname programming changes in v1.32 call for this if ($i % 6 == 4){ $passengerList .= '<tr><td><div style="width:106px; height:75px; overflow:hidden;" title="' . $passengerUserName . '"> <a href="res.php?id=' . $value . '">' . $passengerUserName . '</a><br />' . $psgr_pic . ' </div></td>'; } else { $passengerList .= '<td><div style="width:106px; height:75px; overflow:hidden;" title="' . $passengerUserName . '"> <a href="res.php?id=' . $value . '">' . $passengerUserName . '</a><br />' . $psgr_pic . ' </div></td>'; } } $passengerList .= '</tr></table> <div align="right"><a href="#" onclick="return false" onmousedown="javascript:toggleViewAllPassengers(\'view_all_passengers\');">View Manifest</a></div> </div>'; // END ASSEMBLE FRIEND LIST TO VIEW UP TO 6 ON PROFILE // ASSEMBLE FRIEND LIST AND LINKS TO VIEW ALL(50 for now until we paginate the array) $i = 0; $passengerArray50 = array_slice($passengerArray, 0, 50); $passengerPopBoxList = '<table id="passengerPopBoxTable" width="100%" align="left" cellpadding="6" cellspacing="0">'; foreach ($passengerArray50 as $key => $value) { $i++; // increment $i by one each loop pass $check_pic = 'tktedmembers/' . $value . '/image01.jpg'; if (file_exists($check_pic)) { $psgr_pic = '<a href="res.php?id=' . $value . '"><img src="' . $check_pic . '" width="54px" border="1"/></a>'; } else { $psgr_pic = '<a href="res.php?id=' . $value . '"><img src="tktedmembers/0/image01.jpg" width="54px" border="1"/></a> '; } $sqlName = mysql_query("SELECT username, firstname, country, state_province, city FROM myMembers WHERE id='$value' LIMIT 1") or die ("Sorry we had a mysql error!"); while ($row = mysql_fetch_array($sqlName)) { $puname = $row["username"]; $pfname = $row["firstname"]; $pcountry = $row["country"]; $pstate_province = $row["state_province"]; $pcity = $row["city"]; }408 if (!$puname) {$puname = $pfname;} // If username is blank use the firstname programming changes in v1.32 call for this if ($i % 2) { $passengerPopBoxList .= '<tr bgcolor="#F4F4F4"><td width="14%" valign="top"> <div style="width:106px; height:65px; overflow:hidden;" title="' . $puname . '">' . $psgr_pic . '</div></td>412 <td width="86%" valign="top"><a href="res.php?id=' . $value . '">' . $puname . '</a><br /><font size="-2"><em>' . $pcity . '<br />' . $pstate_province . '<br />' . $pcountry . '</em></font></td> </tr>';Thanks, Scott
  4. Did above and get... SELECT * FROM myMembers WHERE id='18' AND username='Kokomo' AND email='' AND locator='e2fd485aa3ba92321375'
  5. Trying to build a forum. My two Tables that I built for this forum are good.When I test in my browsers…I click on a topic from my index.phpIt goes to section.php?id=36 (script below)If I click on my type="submit" value="Take Off With A Different Conversation" button.I get this “ERROR: You do not exist in the system.” from new_topic.php (script below).I’m following some tuts online and watched them over and over and its just not working, could you PLEASE HELP ME!Sorry for all the script, but I didnt want to leave anything out.____________________________________________________________________________ section.php __________________________________________<?phpsession_start();include_once ("../wi_class_files/agoTimeFormat.php");$myAgoObject = new convertToAgo;include_once "../scripts/connect_to_mysql.php"; // Connect to the database// Get the section ID from the url variable coming inif (isset($_GET['id']) && $_GET['id'] != "") {$sid = preg_replace('#[^0-9]#i', '', $_GET['id']); // filter all characters except numbers for security} else {echo "ERROR: Variables to run this script have been removed from the URL.";exit();}// Query the database for that section id, make sure it exists and get the section title$sql = mysql_query("SELECT * FROM forum_sections WHERE id='$sid' LIMIT 1");$numRows = mysql_num_rows($sql);if ($numRows < 1) {echo "ERROR: That section does not exist you have tampered with our URLs.";exit();}while($row = mysql_fetch_array($sql)){$sectionTitle = $row["title"];}// Use the section ID to query the "forum_posts" table in the database to get all the threads for this section$sql = mysql_query("SELECT * FROM forum_posts WHERE type='a' AND section_id='$sid' ORDER BY date_time DESC LIMIT 25");$dynamicList = "";$numRows = mysql_num_rows($sql);if ($numRows < 1) {$dynamicList = "There are no threads in this section yet. You can be the first to post.";} else {while($row = mysql_fetch_array($sql)){$thread_id = $row["id"];$post_author = $row["post_author"];$post_author_id = $row["post_author_id"];$date_time = $row["date_time"];$convertedTime = ($myAgoObject -> convert_datetime($date_time));$whenPost = ($myAgoObject -> makeAgo($convertedTime));$thread_title = $row["thread_title"];$dynamicList .= '<img src="style/threadPic.jpg" width="26" height="18" alt="Topic" /> ' . $post_author . ' - <a href="view_thread.php?id=' .$thread_id . '">' . $thread_title . '</a> - ' . $whenPost . '<br />';}}?><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link href="style/style.css" rel="stylesheet" type="text/css" /><link rel="icon" href="favicon.ico" type="image/x-icon" /><link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /><title><?php echo $sectionTitle; ?> Work & Trip Forum</title><meta name="Keywords" content="Funny, work, coworker, work, today, wow, forum, airline, blog, announcing, announcer, announced, announce, blog, blogging, blogger,travel, tips, heard, tips, suggestions, nightmares, anniversary, retirement, birthday, party, heard, rumor, chat, gossip" /></head><body><div align="center"><?php include_once("template_header.php"); ?></div><table style="background-color: #FFFFFF; border:#069 1px solid; border-top:none;" width="900" border="0" align="center" cellpadding="12" cellspacing="0"><tr><td width="731" valign="top"><div id="breadcrumbs"><a href="http://www.**********.com">Return Home: **********</a> ← <ahref="http://************.com/root/forum/index.php">Return: Work & Trip Topics</a></div><h1 style="margin-left:12px;"><?php echo $sectionTitle; ?> </h1><form action="new_topic.php" method="post"><input name="forum_id" type="hidden" value="<?php echo $sid; ?>" /><input name="forum_title" type="hidden" value="<?php echo $sectionTitle; ?>" /><input name="myBtn1" type="submit" value="Take Off With A Different Conversation" style="font-size:16px; padding:8px;" /></form><br /><br /><div style="margin-left:12px; font-size:14px; line-height:1.5em;"><?php echo $dynamicList; ?></div><br /><br /><br /></td><td width="189" valign="top"><div style=" width:160px; height:600px; background-color: #F0F0F0; color: #CCC; padding:12px;"> <br /><br />_________________________________________________________________________________________ new_topic.php _____________________________________<?phpsession_start();include_once "../scripts/connect_to_mysql.php"; // Connect to the database// Check to see if the user is logged in with session variablesif (!isset($_SESSION['userloca']) || $_SESSION['userloca'] == "") {echo "You'll need to check in first before you can post anything on your Work & Trip Forum.";exit();} else {// Assume they are a tktedmembers because they have a locator session variable set// Check the database to be sure that their ID, locator, and email session variables all match in the database$u_id = mysql_real_escape_string($_SESSION['id']);$u_name = mysql_real_escape_string($_SESSION['username']);$u_email = mysql_real_escape_string($_SESSION['useremail']);$u_loca = mysql_real_escape_string($_SESSION['userloca']);$sql = mysql_query("SELECT * FROM myMembers WHERE id='$u_id' AND username='$u_name' AND email='$u_email' AND locator='$u_loca'");$numRows = mysql_num_rows($sql);if ($numRows < 1) {echo "ERROR: You do not exist in the system.";exit();}}// Check to make sure the URL variables of "sid" and "title" are setif (!isset($_POST['forum_id']) || $_POST['forum_id'] == "" || !isset($_POST['forum_title']) || $_POST['forum_title'] == "") {echo "Important variables are missing";exit();} else {// Acquire the variables and proceed to show them a form for creating a new topic$forum_section_id = preg_replace('#[^0-9]#i', '', $_POST['forum_id']);$forum_section_title = preg_replace('#[^A-Za-z 0-9]#i', '', $_POST['forum_title']);}$sql = mysql_query("SELECT * FROM forum_sections WHERE id='$forum_section_id' AND title='$forum_section_title'");$numRows = mysql_num_rows($sql);if ($numRows < 1) {echo "ERROR: That section does not exist.";exit();}?><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link href="style/style.css" rel="stylesheet" type="text/css" /><title><?php echo $sectionTitle; ?>Work & Trip Forum</title><script type="text/javascript" language="javascript"><!--function validateMyForm ( ) {var isValid = true;if ( document.form1.post_title.value == "" ) {alert ( "Please type in a title for this topic" );isValid = false;} else if ( document.form1.post_title.value.length < 10 ) {alert ( "Your title must be at least 10 characters long" );isValid = false;} else if ( document.form1.post_body.value == "" ) {alert ( "Please type in your topic body." );isValid = false;}return isValid;}//--></script></head><body><?php include_once("template_header.php"); ?><table style="background-color: #F0F0F0; border:#069 1px solid; border-top:none;" width="900" border="0" align="center" cellpadding="12" cellspacing="0"><tr><td width="666" valign="top"><div id="breadcrumbs"><a href="http://www.**********.com">Return Home: **********</a> ← <ahref="http://***********.com/root/forum/index.php">Return: Work & Trip Forum</a> ← <a href="section.php?id=<?php echo $forum_section_id; ?>"><?php echo$forum_section_title; ?></a></div><h2>Creating a new topic in the <em><?php echo $forum_section_title; ?></em>Work & Trip Form</h2><form action="parse_post.php" method="post" name="form1"><input name="post_type" type="hidden" value="a" />Announcer:<br /><input name="topic_author" type="text" disabled="disabled" maxlength="64" style="width:96%;" value="<?php echo $u_name; ?>" /><br /><br />Announcement Title:<br /><input name="post_title" type="text" maxlength="64" style="width:96%;" /><br /><br />Tell Us What Happen Today... <span class="smtext"> (Use only fictitious names if describing a passenger)</span><br /><br />Please type in your topic body:<br /><textarea name="post_body" rows="15" style="width:96%;"></textarea><br /><br /><input name="" type="submit" value="Post Announcement!" onclick="javascript:return validateMyForm();"/><input name="fsID" type="hidden" value="<?php echo $forum_section_id; ?>" /><input name="fsTitle" type="hidden" value="<?php echo $forum_section_title; ?>" /><input name="uid" type="hidden" value="<?php echo $_SESSION['id']; ?>" /><input name="uloca" type="hidden" value="<?php echo $_SESSION['userloca']; ?>" /></form>________________________________________________________________________________________________________________________________________________Scotty13
  6. With some adjusting to get it just right around the key hole picture, this worked for me. I hope this helps someone else. <body><a href='http://example.com' style='display:bock; width:115px; height:215px; position:absolute; left:40px; top:15px'></a> </body> Thank you ALL above for helping me.Scott
  7. I'm only a rookie, so I would appreciate any help and please don't answer with to complicated replies.I know how to add an image and make it a link or add a link.However, I have this background image on my website (image attached). All the images you see are one picture.I want my members to be able to hover over any part of the “key hole” and be able to click and send them to my home page.Is this even possible to do?Script… <?php ob_start(); ?> <!doctype html> <html> <head> <title>Page Title</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <style type="text/css"> <!-- body { background-image:url('app/web/img/login_logo.jpg'); background-position:center top; background-repeat:no-repeat; } .center { text-align: center; } --> </style> </head> <body> {APP_TPL} </body> </html> <?php include 'listings.php'; ?> Thank you, Scott
  8. I'm only a rookie, so I would appreciate any help and please don't answer with to complicated replies.I’m following tuts to build a social network from someone on youtube.My echo $announcerDisplayList;I attached an image so you can see what my announcer display list does.PHP entry…$announcerDisplayList .= '<table width="100%" align="center" cellpadding="4" style="background-color:#CCCCCC; border:#999 1px solid;"> <tr><td width="12%" bgcolor="#FFFFFF" valign="top"><a href="root/res.php?id=' . $uid . '">' . $announcer_pic . '</a> </td><td width="100%" bgcolor="#F9F9F9" style="line-height:1.5em;" valign="top"><span class="liteGreyColor textsize10"> ' . $whenAnno . ' <a href="root/res.php?id=' . $uid . '"><strong>' . $username . '</a> Announced: </span><br />via <em>' . $anno_device . '</em></span><br /><span class="textsize10"> ' . $the_anno . '</span> </td> </tr></table>'; } } </head> <body> <p> <?php print "$MemberDisplayList"; ?> </p> </div> </div> <?php print "$announcerDisplayList"; ?></td> </table> <br /> <br /> </td> </tr> </table> <?php include_once "footer_template.php"; ?> </body> </html> 1. Why are the entries all spaced out?2. Why “_” between each word. Thanks,Scott
  9. I'm only a rookie, so I would appreciate any help and please don't answer with to complicated replies.Error coming from line 82 (marked below along with script entry).Warning: move_uploaded_file(tktedmembers/24/image01.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/*******/public_html/edit_res.php on line 82Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php0GS4bb' to 'tktedmembers/24/image01.jpg' in /home/*******/public_html/edit_res.php on line 82 // ------- PARSING PICTURE UPLOAD --------- if ($_POST['parse_var'] == "pic"){ // If a file is posted with the form if ($_FILES['fileField']['tmp_name'] != "") { $maxfilesize = 51200; // 51200 bytes equals 50kb if($_FILES['fileField']['size'] > $maxfilesize ) { $error_msg = '<font color="#FF0000">ERROR: Your image was too large, please try again.</font>'; unlink($_FILES['fileField']['tmp_name']); } else if (!preg_match("/\.(gif|jpg|png)$/i", $_FILES['fileField']['name'] ) ) { $error_msg = '<font color="#FF0000">ERROR: Your image was not one of the accepted formats, please try again.</font>'; unlink($_FILES['fileField']['tmp_name']); } else { $newname = "image01.jpg"; LINE 82: $place_file = move_uploaded_file( $_FILES['fileField']['tmp_name'], "tktedmembers/$id/".$newname); } } } // ------- END PARSING PICTURE UPLOAD ---------I tried everything that "I" could think of.Thanks, Scott
  10. Response... Success in database CONNECTION.....no TABLE created. You have problems in the system already, backtrack and debug! Table 'myMembers' already exists. Already exists, so I'm good?
  11. Trying to get my main table to connect. Keeping getting the same error…Success in database CONNECTION.....no TABLE created. You have problems in the system already, backtrack and debug!My table in my script/ Dreamweaver CS 4 matches exactly to entries I have in phpMyAdmin. What ‘am I missing here?<?php require_once "connect_to_mysql.php"; // Tell ourselves on screen if we have connected print "Success in database CONNECTION.....<br />"; // Create the members main table in your new database $result = "CREATE TABLE myMembers ( id int(11) NOT NULL auto_increment, uid int(11) NOT NULL, username varchar(255) NOT NULL, firstname varchar(255) NOT NULL lastname varchar(255) NOT NULL, maidenname varchar(255) NULL, city varchar(255) NOT NULL, state_province varchar(255) NOT NULL, country varchar(255) NOT NULL, workstatus varchar(255) NOT NULL, seniority date NOT NULL default '0000-00-00' airline varchar(255) NOT NULL, currentairline varchar(255) NOT NULL, previousairline varchar(255) NOT NULL, myfirstairline varchar(255) NOT NULL, email varchar(255) NOT NULL, locator varchar(255) NOT NULL, made_res_date datetime NOT NULL default '0000-00-00', last_ckin_date datetime NOT NULL default '0000-00-00', bio_body text NULL, website varchar(255) NULL, ipaddress varchar(255) NOT NULL, passenger_array text NULL, ts timestamp NULL default '0000-00-00 00:00:00', account_type enum('a','b','c') NOT NULL default 'a', email_activated enum('0','1') NOT NULL default '0', private enum('0','1') NOT NULL default '0', PRIMARY KEY (id), UNIQUE KEY email (email) ) "; if (mysql_query($result)){ print "Success in TABLE creation!...... <br /><br /><b>That completes the table setup, now delete the file <br /> named 'create_Table.php' and you are ready to move on. Let us go!</b>"; } else { print "no TABLE created. You have problems in the system already, backtrack and debug!"; } exit(); ?>Thanks, Scott
  12. It maybe the myMembers_table.php I get this error when I test it... Success in database CONNECTION..... no TABLE created. You have problems in the system already, backtrack and debug! <?php require_once "connect_to_mysql.php"; print "Success in database CONNECTION.....<br />"; $result = "CREATE TABLE myMembers ( id int(11) NOT NULL auto_increment, username varchar(255) NOT NULL, firstname varchar(255) NOT NULL lastname varchar(255) NOT NULL, maidenname varchar(255) NULL, ) "; if (mysql_query($result)){ print "Success in TABLE creation!...... <br /><br /><b>That completes the table setup, now delete the file <br /> named 'create_Table.php' and you are ready to move on. Let us go!</b>"; } else { print "no TABLE created. You have problems in the system already, backtrack and debug!"; } exit(); ?> Thanks, Scott
  13. Tried everything above and no errors, still just the username.
  14. This just displays the username aka first name. I want it to also display the member’s last name and maiden name if they have one. /////// Mechanism to Display Real Name Next to Username - real name(username) //////////////////////////if ($firstname != "") {$mainNameLine = "$firstname $maidenname $lastname ($username)";$username = $firstname;} else {$mainNameLine = $username; $maidenname; $lastname;} I want to display maiden and last name along with the user name. I've tried everything I could think of. Any suggestions? Thanks,Scott
  15. Spoke too soon. It works perfect in IE broser. When I test in Chrome, Safari and Firefox I get the following error...Warning: Cannot modify header information - headers already sent by (output started at /home/******/public_html/root/wi_class_files/autoMakeLinks.php:15) in /home/myglobal/public_html/root/res.php on line 45// ------- ESTABLISH THE PAGE ID ACCORDING TO CONDITIONS ---------if (isset($_GET['id'])) {$id = preg_replace('#[^0-9]#i', '', $_GET['id']); // filter everything but numbers} else if (isset($_SESSION['idx'])) {$id = $ckinOptions_id;} else {Line 45: header("location: index.php");exit();}// ------- END ESTABLISH THE PAGE ID ACCORDING TO CONDITIONS ---------
×
×
  • Create New...