-
Displays username, but not maiden or last name.
Post removed. See here for details. Next time I'm just going to ban you, since you seem to have a problem with following instructions.
-
ERROR: Deprecated: Function eregi() is deprecated in and Notice: Undefined index: device in
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 ---------
-
ERROR: Deprecated: Function eregi() is deprecated in and Notice: Undefined index: device in
FIXED (changed).... LINE 185: if (preg_match("/".$Match."/", $agent)) { LINE 247: $anno_device = $row["anno_device"]; Thank you everyone for your help. Scotty
-
ERROR: Deprecated: Function eregi() is deprecated in and Notice: Undefined index: device in
My profile page is giving me the following errors. Deprecated: Function eregi() is deprecated in /home/******/public_html/root/res.php on line 185 Notice: Undefined index: device in /home/******/public_html/root/res.php on line 247 LINES 185 & 247 are marked below. Using PHP 5.3.x On line 185, I've tried preg and preg_match. They both gave me errors. I appreciate any help and please don't answer with to complicated replies. I'm only a rookie and as you can see this is all I could achieve. Thanks, Scott // ------- DETECT USER DEVICE ---------- $user_device = ""; $agent = $_SERVER['HTTP_USER_AGENT']; if (preg_match("/iPhone/", $agent)) { $user_device = "iPhone Mobile"; } else if (preg_match("/Android/", $agent)) { $user_device = "Android Mobile"; } else if (preg_match("/IEMobile/", $agent)) { $user_device = "Windows Mobile"; } else if (preg_match("/Chrome/", $agent)) { $user_device = "Google Chrome"; } else if (preg_match("/MSIE/", $agent)) { $user_device = "Internet Explorer"; } else if (preg_match("/Firefox/", $agent)) { $user_device = "Firefox"; } else if (preg_match("/Safari/", $agent)) { $user_device = "Safari"; } else if (preg_match("/Opera/", $agent)) { $user_device = "Opera"; } $OSList = array ( // Match user agent string with operating systems 'Windows 3.11' => 'Win16', 'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)', 'Windows 98' => '(Windows 98)|(Win98)', 'Windows 2000' => '(Windows NT 5.0)|(Windows 2000)', 'Windows XP' => '(Windows NT 5.1)|(Windows XP)', 'Windows Server 2003' => '(Windows NT 5.2)', 'Windows Vista' => '(Windows NT 6.0)', 'Windows 7' => '(Windows NT 6.1)|(Windows NT 7.0)', 'Windows NT 4.0' => '(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)', 'Windows ME' => 'Windows ME', 'Open BSD' => 'OpenBSD', 'Sun OS' => 'SunOS', 'Linux' => '(Linux)|(X11)', 'Mac OS' => '(Mac_PowerPC)|(Macintosh)', 'QNX' => 'QNX', 'BeOS' => 'BeOS', 'OS/2' => 'OS/2', 'Mac OS' => 'Mac OS', 'Search Bot'=>'(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves/Teoma)|(ia_archiver)' ); // Loop through the array of user agents and matching operating systems foreach($OSList as $CurrOS=>$Match) { // Find a match LINE 185: if (eregi($Match, $agent)) { break; } else { $CurrOS = "Unknown OS"; } } $device = "$user_device : $CurrOS"; // ------- END DETECT USER DEVICE ---------- // ------- POST NEW BLAB TO DATABASE --------- $anno_outout_msg = ""; if (isset($_POST['anno_field']) && $_POST['anno_field'] != "" && $_POST['anno_field'] != " "){ $annoWipit = $_POST['annoWipit']; $sessWipit = base64_decode($_SESSION['wipit']); if (!isset($_SESSION['wipit'])) { } else if ($annoWipit == $sessWipit) { // Delete any annos over 50 for this member $sqlDeleteAnnos = mysql_query("SELECT * FROM announcing WHERE tkt_id='$id' ORDER BY anno_date DESC LIMIT 50"); $bi = 1; while ($row = mysql_fetch_array($sqlDeleteAnnos)) { $anno_id = $row["id"]; if ($bi > 20) { $deleteAnnos = mysql_query("DELETE FROM announcing WHERE id='$anno_id'"); } $bi++; } // End Delete any annos over 20 for this member $anno_field = $_POST['anno_field']; $anno_field = stripslashes($anno_field); $anno_field = strip_tags($anno_field); $anno_field = mysql_real_escape_string($anno_field); $anno_field = str_replace("'", "'", $anno_field); $sql = mysql_query("INSERT INTO announcing (tkt_id, the_anno, anno_date, anno_type, anno_device) VALUES('$id','$anno_field', now(),'a','$anno_device')") or die (mysql_error()); $anno_outout_msg = "Your announcement has been posted!"; } } // ------- END POST NEW BLAB TO DATABASE --------- // ------- MEMBER BLABS OUTPUT CONSTRUCTION --------- /////// Mechanism to Display Pic if (file_exists($check_pic)) { $anno_pic = '<div style="overflow:hidden; height:40px;"><a href="res.php?id=' . $id . '"><img src="' . $check_pic . '" width="40px" border="0" /></a></div>'; } else { $anno_pic = '<div style="overflow:hidden; height:40px;"><a href="res.php?id=' . $id . '"><img src="' . $default_pic . '" width="40px" border="0" /></a></div>'; } /////// END Mechanism to Display Pic $sql_annos = mysql_query("SELECT id, tkt_id, the_anno, anno_date, anno_type, anno_device FROM announcing WHERE tkt_id='$id' ORDER BY anno_date DESC LIMIT 30"); while($row = mysql_fetch_array($sql_annos)){ $annoid = $row["id"]; $announcer_id = $row["tkt_id"]; $the_anno = $row["the_anno"]; $the_anno = ($activeLinkObject -> makeActiveLink($the_anno)); $anno_date = $row["anno_date"]; $convertedTime = ($myObject -> convert_datetime($anno_date)); $whenAnno = ($myObject -> makeAgo($convertedTime)); $anno_date = $row["anno_date"]; $anno_type = $row["anno_type"]; LINE 247: $anno_device = $row["device"]; $announcerDisplayList .= ' <table style="background-color:#FFF; border:#999 1px solid; border-top:none;" cellpadding="5" width="100%"> <tr> <td width="10%" valign="top">' . $anno_pic . '</td> <td width="90%" valign="top" style="line-height:1.5em;"> <span class="liteGreyColor textsize9">' . $whenAnno . ' <a href="res.php?id=' . $announcer_id . '"><strong>' . $mainNameLine . '</strong></a> via <em>' . $anno_device . '</em></span><br /> ' . $the_anno . ' </td> </tr></table>'; }
- Auto Fresh My Pages
-
Search id must be an integer - What 'am I Missing? HELP!
I replaced it with intval($_GET['search_id']); and now it works. Thanks for responding so quickly.
-
Search id must be an integer - What 'am I Missing? HELP!
I’m a newbie… Here’s my php script: search_rules.php (Line 33 - marked below) <?php */ function inc_exc_str($is_included) { return $is_included ? l10n('included') : l10n('excluded'); } // +-----------------------------------------------------------------------+ // | initialization | // +-----------------------------------------------------------------------+ define('PHPWG_ROOT_PATH','./'); include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); check_status(ACCESS_FREE); include_once( PHPWG_ROOT_PATH.'include/functions_search.inc.php' ); $page['body_id'] = 'thePopuphelpPage'; $title = l10n('Piwigo Help'); $page['page_banner'] = ''; $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1); include(PHPWG_ROOT_PATH.'include/page_header.php'); $template->set_filenames(array('search_rules' => 'search_rules.tpl')); // +-----------------------------------------------------------------------+ // | Textual rules creation | // +-----------------------------------------------------------------------+ // Rules are stored in database, serialized in an array. This array must be // transformed into a list of textual rules. [b]Line 33: $search = get_search_array($_GET['search_id']);[/b] if (isset($search['q'])) { $template->append('search_words', $search['q']); } else { $template->assign( array( 'INTRODUCTION' => 'OR' == $search['mode'] ? l10n('At least one listed rule must be satisfied.') : l10n('Each listed rule must be satisfied.'), ) ); } if (isset($search['fields']['allwords'])) { $template->append( 'search_words', sprintf( l10n('searched words : %s'), join(', ', $search['fields']['allwords']['words']) ) ); } if (isset($search['fields']['tags'])) { $template->assign('SEARCH_TAGS_MODE', $search['fields']['tags']['mode']); $query = ' SELECT name FROM '.TAGS_TABLE.' WHERE id IN ('.implode(',', $search['fields']['tags']['words']).') ;'; $template->assign( 'search_tags', array_from_query($query, 'name') ); } if (isset($search['fields']['author'])) { $template->append( 'search_words', sprintf( l10n('author(s) : %s'), join(', ', $search['fields']['author']['words']) ) ); } if (isset($search['fields']['cat'])) { if ($search['fields']['cat']['sub_inc']) { // searching all the categories id of sub-categories $cat_ids = get_subcat_ids($search['fields']['cat']['words']); } else { $cat_ids = $search['fields']['cat']['words']; } $query = ' SELECT id, uppercats, global_rank FROM '.CATEGORIES_TABLE.' WHERE id IN ('. implode(',', $cat_ids). ') ;'; $result = pwg_query($query); $categories = array(); if (!empty($result)) { while ($row = pwg_db_fetch_assoc($result)) { array_push($categories, $row); } } usort($categories, 'global_rank_compare'); foreach ($categories as $category) { $template->append( 'search_categories', get_cat_display_name_cache( $category['uppercats'], null, // no url on category names false // no blank replacement ) ); } } foreach (array('date_available', 'date_creation') as $datefield) { if ('date_available' == $datefield) { $lang_items = array( 'date' => l10n('posted on %s'), 'period' => l10n('posted between %s (%s) and %s (%s)'), 'after' => l10n('posted after %s (%s)'), 'before' => l10n('posted before %s (%s)'), ); } elseif ('date_creation' == $datefield) { $lang_items = array( 'date' => l10n('created on %s'), 'period' => l10n('created between %s (%s) and %s (%s)'), 'after' => l10n('created after %s (%s)'), 'before' => l10n('created before %s (%s)'), ); } $keys = array( 'date' => $datefield, 'after' => $datefield.'-after', 'before' => $datefield.'-before', ); if (isset($search['fields'][ $keys['date'] ])) { $template->assign( strtoupper($datefield), sprintf( $lang_items['date'], format_date($search['fields'][ $keys['date'] ]) ) ); } elseif (isset($search['fields'][ $keys['before'] ]) and isset($search['fields'][ $keys['after'] ])) { $template->assign( strtoupper($datefield), sprintf( $lang_items['period'], format_date($search['fields'][ $keys['after'] ]['date']), inc_exc_str($search['fields'][ $keys['after'] ]['inc']), format_date($search['fields'][ $keys['before'] ]['date']), inc_exc_str($search['fields'][ $keys['before'] ]['inc']) ) ); } elseif (isset($search['fields'][ $keys['before'] ])) { $template->assign( strtoupper($datefield), sprintf( $lang_items['before'], format_date($search['fields'][ $keys['before'] ]['date']), inc_exc_str($search['fields'][ $keys['before'] ]['inc']) ) ); } elseif (isset($search['fields'][ $keys['after'] ])) { $template->assign( strtoupper($datefield), sprintf( $lang_items['after'], format_date($search['fields'][ $keys['after'] ]['date']), inc_exc_str($search['fields'][ $keys['after'] ]['inc']) ) ); } } // +-----------------------------------------------------------------------+ // | html code display | // +-----------------------------------------------------------------------+ $template->pparse('search_rules'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); ?> Thanks in advance, Scotty13
-
MySQL Error: 1064 from a Table and 2 diff php scripts
I’m working with php scripts, phpMyAdmin with Dreamweaver CS4. I’m building a social network website. I have a table called MDB_trvldiary. I’m getting this error on my page title: edit_trvldiary_entry.php Warning: ereg_replace() [function.ereg-replace]: REG_EMPTY in /home/****/public_html/root/******/data.inc.php on line 126 if(!$db_query) { $x_query = explode('\'',mysql_error()); Line 26: $query = ereg_replace($x_query[1],"<strong>".$x_query[1]."</strong>",$query); echo "<font color='red' face='Verdana'><strong>MySQL Error: ".mysql_errno()."</strong></font><hr size='2'><font face='Verdana' size='2'>".mysql_error(); -------------------------------------------------------------------------------- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 SQL Query: [ ] Line 1 from Table: $result = mysql_query ("CREATE TABLE MDB_trvldiary ( In File: /home/*****/public_html/root/******/edit_trvldiary_entry.php Line Number: 25 Line 25: $query = do_query("select entry from ".$config['tableTRVLDiary']." where D_ID=".$_GET['id'],__LINE__,__FILE__); Thanks in advance, S
-
Image in a PHP Script. Here is my error...
I don’t usually don’t have a problem. This is my script below, following my error message. Image appears but with error. Ive tried everything. What Im I missing? <img src="images/flightattendant.jpg" alt="Jeanne - Your flight attendant" width="378" height="851" align="right" /> <?php session_start(); // Force script errors and warnings to show on page in case php.ini file is set to not display them error_reporting(E_ALL); ini_set('display_errors', '1'); // Unset all of the session variables $_SESSION = array(); // If it's desired to kill the session, also delete the session cookie if (isset($_COOKIE['idCookie'])) { setcookie("idCookie", '', time()-42000, '/'); setcookie("locaCookie", '', time()-42000, '/'); } // Destroy the session variables session_destroy(); // Check to see if their session is in fact destroyed if(!session_is_registered('firstname')){ print "Bon Voyage... Every goodbye makes the next hello closer</font>."; exit(); header("location: index.php"); // << makes the script send them to any page we set } else { print "<h2>Sorry - You’re not able to depart at this time.</h2>"; exit(); } ?> ERROR: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/********/public_html/root/logout.php:2) in /home/********/public_html/root/logout.php on line 3 Bon Voyage... Every goodbye makes the next hello closer.
-
Parse error: syntax error, unexpected '<' in /home on line 63
Ok, I replaced what I had to what you gave me. I also replaced ALL &apos with a ' Now I get an error on line 83... Parse error: syntax error, unexpected '.' in /home/myglobal/public_html/root/auto_refresh_anno.php on line 83 Line 83: <td width="7%" bgcolor="#FFFFFF" valign="top"><a href="res.php?id='; . $uid . ';">'; . $user_pic . ';</a> Going Nuts. S
-
“drop down” and “search box” for members.
Building a social network and I want my members to be able to search for other members who work for a certain company and a drop down menu. They can… Select (highlight a postion) / Search / Enter I don’t have my website up and running so, I’m not sure if my php entries are correct. Could you take a look please to see if I’m missing anything? I have the following two… #1. Drop Down Select - in my search_profile.php /td> <td width="31%" bgcolor="#0075FF"><form id="form3" name="form3" method="post" action="members_search.php"> Search: Work Status <form name="workstatus"> </select> <select name="dropDown" id="dropDown"> <option value="Currently Employed">Currently Employed</option> <option value="Retired">Retired</option> <option value="Diff Career">Diff Career</option> </select> <input name="dropDown" type="submit" class="search" id="dropDown" value="Go" /> <div align="center"></div> </form></td> </tr> _____________________________________________________ #2. Search Box - in my search_profile.php </td> <td width="37%" bgcolor="#0075FF"><form id="form3" name="form3" method="post" action="tktedmembers_search.php"> <div align="center">earch By Airline <input type="text" name="aname" id="aname" /> <input name="button3" type="submit" id="button3" value="Go" /> S <input type="hidden" name="listByq" value="by_airline" /> </div> </form></td> Thanks, Scott
-
Parse error: syntax error, unexpected '<' in /home on line 63
Nope, doesnt work!
-
How - ? Website up and running
I’m building a social network website so I need to test if the joining pages work, delete, send messages, etc….
-
How - ? Website up and running
Thanks guys for your quick responses. I’m a newbie. I’m using Dreamweaver CS4. Could somebody tell me how I set up my web to go online? If I set up my html page Under Construction before I go “live”, will I see the pages that way when testing in my browser? Thanks again, Scotty
-
How - ? Website up and running
Hi I would like to get my website up and running on my server (live), so I can work out the pages that have errors. I don’t want anybody trying to get on my website… I want them to see an “under Construction’ page. How do I set up getting my website online and setup under construction? Thanks, Scotty