Jump to content

Andrius

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Andrius's Achievements

Member

Member (2/5)

0

Reputation

  1. wow.. just learned a lot in a few lines. thanks a ton! got msn? I may have some business for you
  2. question is located in 1st post. I cant run all the queries and have them display on differant areas of the page. For example <? $feati = 0; while($feati < $num) { $feature_image = mysql_result($result,$feati,"image"); $feature_link = mysql_result($result,$feati,"link"); $feati++; } doesn't display the "image" and "link" from the table "Header_feature" it's trying to pull the image from "News" because there are some of the same column names in each table such as "image" is seen in "News" and "Header_feature" tables. Is there anyway around this or do I have to re-name column names so there are no dupes amung tables
  3. what you described I already have. Let me post my badly written file here and you can obliterate it lol. <?php $username = "*****"; $password = "*****"; $database = "*****"; $host = "*****"; mysql_connect($host,$username,$password); @mysql_select_db($database) or die("Unable to select database"); $query = "SELECT * FROM News,Feature,Header_feature ORDER BY date DESC LIMIT 0, 6"; $result = mysql_query($query); $num = mysql_numrows($result); mysql_close(); ?> <table width="1000" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td> </td> <td width="102" height="163"><img src="Images/1.gif" width="102" height="163" /></td> <td width="482" height="163"><img src="Images/2.gif" width="482" height="163" /></td> <td width="233" height="163"><img src="Images/3.gif" width="233" height="163" /></td> <td width="117" height="163"><a href="Login.php"><img src="Images/4.gif" width="117" height="163" border="0"/></a></td> <td><img src="Images/4addon.gif" width="34" height="163" /></td> </tr> <tr> <td> </td> <td width="102" height="77"><img src="Images/5.gif" width="102" height="77" /></td> <td background="Images/6_bg.gif"><div align="center"><img src="Images/banner_top.jpg" width="468" height="60" /></div></td> <td width="233" height="77"><img src="Images/7.gif" width="233" height="77" /></td> <td width="117" height="77"><img src="Images/8.gif" width="117" height="77" /></td> <td> </td> </tr> <tr> <td width="32" height="40"><img src="Images/9.gif" width="32" height="40" border="0" usemap="#Map4" /></td> <td width="102" height="40"><img src="Images/10.gif" width="102" height="40" border="0" usemap="#Map3" /></td> <td width="482" height="40"><img src="Images/11.gif" width="482" height="40" border="0" usemap="#Map2" /></td> <td width="233" height="40"><img src="Images/12.gif" width="233" height="40" border="0" usemap="#Map" /></td> <td width="117" height="40"><img src="Images/13.gif" width="117" height="40" /></td> <td width="34" height="40"><img src="Images/14.gif" width="34" height="40" /></td> </tr> <tr> <td width="32" height="80" valign="top" background="Images/20_runner_BG.gif"><img src="Images/15.gif" width="32" height="80" /></td> <td height="80" colspan="3" valign="top" background="Images/bg_inner.gif"><div align="center"> <table width="815" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td width="8" height="22"><img src="Images/feature_1.gif" alt="Get Live Media" width="8" height="22" /></td> <td width="257" height="22"><img src="Images/feature_2.gif" alt="Get Live Media" width="257" height="22" /></td> <td width="18" height="22"><img src="Images/feature_3.gif" alt="Get Live Media" width="18" height="22" /></td> <td width="169" height="22"><img src="Images/feature_4.gif" alt="Get Live Media" width="169" height="22" /></td> <td width="20" height="22"><img src="Images/feature_5.gif" alt="Get Live Media" width="20" height="22" /></td> <td width="301" height="22"><img src="Images/feature_6.gif" alt="Get Live Media" width="301" height="22" /></td> <td width="42" height="22"><img src="Images/feature_7.gif" alt="Get Live Media" width="42" height="22" /></td> </tr> <tr> <td width="8" height="55"><img src="Images/feature_8.gif" alt="Get Live Media" width="8" height="55" /></td> <td width="257" rowspan="3" background="Images/feature_BG.gif"> <div align="center"> <? $feati = 0; while($feati < $num) { $feature_image = mysql_result($result,$feati,"image"); $feature_link = mysql_result($result,$feati,"link"); $feati++; } echo " <img src=\"Images/$feature_image\" border=\"1\" /> "; ?> </div> </td> <td width="18" height="55"><img src="Images/feature_10.gif" alt="Get Live Media" width="18" height="55" /></td> <td width="169" height="55" background="Images/feature_11.gif"><div align="center"><img src="Images/feature2.jpg" width="165" height="52" bordercolor="#ffffff" border="1" /></div></td> <td width="20" height="55"><img src="Images/feature_12.gif" alt="Get Live Media" width="20" height="55" /></td> <td width="301" height="55" background="Images/feature_13.gif"><div align="center"> <!-- THIS IS THE START OF THE TICKER --> <? $fi = 0; while($fi < $num) { $ticker = mysql_result($result,$fi,"feature"); $fi++; } echo " <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td class='style1'><marquee scrolldelay=150> $ticker </marquee></td> </tr> </table> "; ?> </div></td> <td width="42" height="55"><img src="Images/feature_14.gif" alt="Get Live Media" width="42" height="55" /></td> </tr> <tr> <td width="8" height="19"><img src="Images/feature_15.gif" alt="Get Live Media" width="8" height="19" /></td> <td width="18" height="19"><img src="Images/feature_16.gif" alt="Get Live Media" width="18" height="19" /></td> <td width="169" height="19"><img src="Images/feature_17.gif" alt="Get Live Media" width="169" height="19" /></td> <td width="20" height="19"><img src="Images/feature_18.gif" alt="Get Live Media" width="20" height="19" /></td> <td width="301" height="19"><img src="Images/feature_19.gif" alt="Get Live Media" width="301" height="19" /></td> <td width="42" height="19"><img src="Images/feature_20.gif" alt="Get Live Media" width="42" height="19" /></td> </tr> <tr> <td width="8" height="56"><img src="Images/feature_21.gif" alt="Get Live Media" width="8" height="56" /></td> <td width="18" height="56"><img src="Images/feature_22.gif" alt="Get Live Media" width="18" height="56" /></td> <td height="56" background="Images/feature_23.gif"><div align="center"><img src="Images/feature3.jpg" alt="DJ" width="165" height="52" border="1" bordercolor="#ffffff" /></div></td> <td width="20" height="56"><img src="Images/feature_24.gif" alt="Get Live Media" width="20" height="56" /></td> <td height="56" background="Images/feature_25.gif"><div align="center"><img src="Images/feature4.jpg" width="295" height="54" /></div></td> <td width="42" height="56"><img src="Images/feature_26.gif" alt="Get Live Media" width="42" height="56" /></td> </tr> <tr> <td width="8" height="24"><img src="Images/feature_27.gif" alt="Get Live Media" width="8" height="24" /></td> <td width="257" height="24"><img src="Images/feature_28.gif" alt="Get Live Media" width="257" height="24" /></td> <td width="18" height="24"><img src="Images/feature_29.gif" alt="Get Live Media" width="18" height="24" /></td> <td width="169" height="24"><img src="Images/feature_30.gif" alt="Get Live Media" width="169" height="24" /></td> <td width="20" height="24"><img src="Images/feature_31.gif" alt="Get Live Media" width="20" height="24" /></td> <td width="301" height="24"><img src="Images/feature_32.gif" alt="Get Live Media" width="301" height="24" /></td> <td width="42" height="24"><img src="Images/feature_33.gif" alt="Get Live Media" width="42" height="24" /></td> </tr> <tr> <td height="24" colspan="7"> <!-- START OF NEWS SECTION --> <div align="center"><? $i = 0; while($i < $num) { $subject = mysql_result($result,$i,"subject"); $body = mysql_result($result,$i,"body"); $image = mysql_result($result,$i,"image"); $date = mysql_result($result,$i,"date"); echo "<table width='752' border='0' align='center' cellpadding='1' cellspacing='0' bgcolor='#FFFFFF'> <tr> <td colspan=\"2\" bgcolor='#363636' beight='20'><span class='style1'><div align='left'> <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"130\"><img src=\"Images/article_header.jpg\" width=\"130\" height=\"20\" /></td> <td width=\"622\"><span class='style1'><div align='left'><strong>$subject</strong></div> </span></td> </tr> </table> </div> </span></td> </tr> <td width=\"100\"> <table width='750' border='0' align='center' cellpadding='0' cellspacing='0'> <tr> "; if(!empty($image)) { $image_url = "/news_images/".$image; $image_link = '<img src="'.$image_url.'" alt="Article Image" align=left height=116 width=116 border=0>'; echo " <td width='120' bgcolor='#363636' valign='top'> <div align='center'> <a href='$image_url'>$image_link</a> </div> </td> <td width='630' valign=top bgcolor='#363636'> <div align='right' class='style1'> Article Added: $date </div> <hr> <div align='left' class='style3'> $body </div> </td> </tr> </table></td> </tr> </table><br>"; } ELSE echo" <td width='750' valign=top bgcolor='#363636'> <div align='right' class='style1'> Article Added: $date </div> <hr> <div align='left' class='style3'> $body </div> </td> </tr> </table></td> </tr> </table><br>"; $i++; } ?> <A HREF="Archive_news.php"><img src='Images/btn_archive.gif' width="121" height="26" border="0"></a></div> </td> </tr> </table> </div></td> <td width="117" valign="top" bgcolor="#000000"><div align="center"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="117" height="80"><img src="Images/18.gif" alt="Get Live Media" width="117" height="80" /></td> </tr> <tr> <td height="100%"><div align="center"><img src="Images/banner_right.jpg" alt="MyCanadate" width="100" height="487" longdesc="FREE ONLINE DATING" /></div></td> </tr> </table> </div></td> <td width="34" height="80" valign="top" background="Images/21_runner_BG.gif"><img src="Images/19.gif" width="34" height="80" /></td> </tr> <tr> <td width="32" height="100%" background="Images/22.gif"> </td> <td height="100%" colspan="4" valign="top" background="Images/23_runner_BG.gif"> </td> <td width="34" height="100%" background="Images/24.gif"> </td> </tr> </table> </div> <map name="Map" id="Map"><area shape="rect" coords="-40,3,81,37" href="Forum/" target="_blank" alt="Live Online FORUM" /> </map> <map name="Map2" id="Map2"><area shape="rect" coords="439,3,494,38" href="Forum/" target="_blank" alt="Live Online FORUM" /> <area shape="rect" coords="-18,5,63,35" href="Series.php" alt="Live Online Series" /> <area shape="rect" coords="65,6,158,34" href="Culture.php" alt="Culture - What's Hot!" /> <area shape="rect" coords="161,6,224,36" href="Club.php" alt="Live Events" /> <area shape="rect" coords="229,6,362,33" href="Music.php" alt="Music & Entertainment" /> <area shape="rect" coords="366,6,435,35" href="Local.php" alt="Videos NEW AND OLD" /> </map> <map name="Map3" id="Map3"><area shape="rect" coords="42,3,127,38" href="Series.php" alt="Live Online Series" /> <area shape="rect" coords="-22,6,37,36" href="Index.php" alt="News / Home" /> </map> <map name="Map4" id="Map4"><area shape="rect" coords="11,5,45,35" href="Index.php" alt="News / Home" /> </map>
  4. Header_feature = Image for ads at the top of the page (I could rename to Feature_ad if it pleases you) Feature = The Scrolling Marquee (I could rename table to "Marquee") News = News Articles All tables are UNRELATED. Now how would I do what I mentioned above? Any idea?
  5. Hello! I need to know how to run a php / mysql query to do the following. I have 1 database (lets call it "database" for now) within this database there are multiple tables ("News","Feature","Header_feature") For NEWS I need only the 6 latest results pulled from that table and displayed in a table. The "News" table has the following columns "ID","Title","Date","Body","Image" For Feature I need only 1 result retrieved from the database and displayed under the variable $ticker as it will display as a scrolling marquee within a table. The "Feature" table has the following columns "ID","Ticker". For Header_feature I need only 1 result retrieved from the database and displayed in the following manner <a href="$link"><img src"$header_feature"></a> The "Header_feature table has the following columns "ID","image","link" How would I code this all into 1 page? I cant seem to get the query to do everything I want it to and display the results properly. You can see what I have so far at www.getlivemedia.com The $ticker is the scrolling text near the top of the page and the news is obviously the bulk of the page and $feature_image is the broken image. ANY and ALL help is greatly appreciated.
  6. got help and everything is working smoothly!  thanks so much!
  7. thanks soooo much for the improved code.  I'm still a lil new at this whole php / mysql thing so I'm learning as I go as you can tell.  The new code seems to loop like the old code did and return results that are the same.  www.getliveevents.com/Member_page.php to see what I mean. 
  8. the question is why is it looping the results.  is should be cycling through the results and displaying eg: show A... show B... show C but instead it's looping show A. My second question is.. how can I modify this code to do the following: I need this code to display all shows from the table Featured in 1 html table and I need all results from Streams to be displayed in a second HTML table that looks differant from the first completely.  Cant wait to hear ideas.. thanks!!
  9. Ok the URL to view the error is at : http://www.getlivemedia.com/Member_page.php The Problem Code is below: [code]<?     include("Includes/conn.php"); mysql_connect($host,$user,$password); @mysql_select_db($database) or die("Unable to select database"); $query = " SELECT * FROM Featured , Streams "; $result = mysql_query($query); $num = mysql_numrows($result); mysql_close(); $i = 0; while($i < $num) { //Featured Table $f_id        = mysql_result($result,$i,"f_id");     $subject    = mysql_result($result,$i,"f_subject");     $body        = mysql_result($result,$i,"f_body"); $cam_url    = mysql_result($result,$i,"f_cam_url"); $time        = mysql_result($result,$i,"f_time"); $image      = mysql_result($result,$i,"f_image"); $status      = mysql_result($result,$i,"f_status"); $url        = "Feed.php?id=$f_id"; //Streams Table $s_id                = mysql_result($result,$a,"s_id");     $s_user              = mysql_result($result,$a,"s_user");     $s_cam_url            = mysql_result($result,$a,"s_cam_url"); $s_show_image        = mysql_result($result,$a,"s_show_image"); $s_show_name          = mysql_result($result,$a,"s_show_name"); $s_show_description  = mysql_result($result,$a,"s_show_description"); $s_show_status        = mysql_result($result,$a,"s_show_status"); $s_show_time          = mysql_result($result,$a,"s_show_time"); $s_button            = mysql_result($result,$a,"s_button"); $s_category          = mysql_result($result,$a,"s_category"); if ( $status == "1" )       { echo " <table width='497' border='0' cellspacing='0' cellpadding='1'>   <tr>     <td bgcolor='#FFFFFF'><div align='center'>       <table width='495' border='0' cellspacing='0' cellpadding='2'>         <tr>           <td width='99%' bgcolor='#191919'><div align='center'><img src='Feature_images/$image' width='300' height='200'/></div></td>         </tr>         <tr>           <td height='20' bgcolor='#666666'><div align='center' class='style2'>$subject</div></td>         </tr>         <tr>           <td height='20' valign='middle' bgcolor='#363636'><div align='center' class='style4'>$body              </div> </td>           </tr>         <tr>           <td height='20' bgcolor='#666666'><div align='center'><span class='style2'>SHOW BEGINS AT: $time</span></div></td>         </tr>         <tr>           <td height='20' valign='middle' bgcolor='#363636'><div align='center' class='style4'>PLEASE BE ADVISED THE SHOW IS LIMITED TO <span class='style2'>50</span> USERS PER FEED <br><br>   <A HREF=\"http://www.getliveevents.com/$url\" onClick=\"return popup(this, 'notes')\"><img src='Images/btn_watch_live.jpg' border=0/></A>                       </div></td>         </tr>             </table>     </div></td>   </tr> </table><br><Br> "; } else { echo ""; }     $i++; } echo "<table width='702' border='0' cellspacing='0' cellpadding='1'>     <tr>       <td bgcolor='#FFFFFF'><div align='center'>         <table width='700' border='0' cellpadding='2' cellspacing='2' bgcolor='#333333'>           <tr>             <td width='139' bgcolor='#970000' class='style4'><div align='center' class='style5'>CATEGORY</div></td>             <td width='424' bgcolor='#970000' class='style4'><div align='center' class='style5'>SHOW NAME </div></td>             <td width='127' bgcolor='#970000'><div align='center' class='style5'>SCHEDULE</div></td>           </tr>"; $a = 1; while($a < $num) { if ( $s_show_status == "1" )       { echo "   <tr>             <td bgcolor='#FF0000' class='style4'><div align='center'>$s_category</div></td>             <td class='style4'><div align='left'>$s_show_name</div></td>             <td class='style4'><div align='center'>$s_show_time</div></td>           </tr>         "; } else { echo ""; }     $a++; } echo "</table>       </div></td>     </tr>   </table>"; ?>[/code] Thanks sooo much for any help!
  10. Ok here is what I am trying to do and then I will paste what I currently have below.  I want to be able to have my clients login using their user/pass I give them but when they login depending on who they are they will be re-directed to their respective pages.  Like "Club_Vibes" user logs into http://www.getliveevents.com/Club_Vibes/Index.php.  The URL I would like stored in the Membership Database as well. [code]<?php /* Program: Login.php * Desc:    Login program for the Members Only section of the *          pet store. It provides two options: (1) login *          using an existing Login Name and (2) enter a new *          login name. Login Names and passwords are stored *          in a MySQL database. */                                         # 9   include("Includes/conn.php"); #10   switch (@$_GET['do'])                                  #11   {     case "login":                                        #13       $connection = mysql_connect($host, $user,$password) #14               or die ("Couldn't connect to server.");       $db = mysql_select_db($database, $connection)               or die ("Couldn't select database.");      #17       $sql = "SELECT username FROM getlive_members               WHERE username='$_POST[fusername]'";      #20       $result = mysql_query($sql)                   or die("Couldn't execute query.");      #22       $num = mysql_num_rows($result);                    #23       if ($num == 1)  // login name was found            #24       {         $sql = "SELECT username FROM getlive_members                 WHERE username='$_POST[fusername]'                 AND password=password('$_POST[fpassword]')";         $result2 = mysql_query($sql)                   or die("Couldn't execute query 2.");  #30         $num2 = mysql_num_rows($result2);         if ($num2 > 0)  // password is correct          #32         {           $_SESSION['auth']="yes";                      #34           $logname=$_POST['fusername'];           $_SESSION['logname'] = $logname;              #36           $today = date("Y-m-d h:i:s");                  #37           $sql = "INSERT INTO getlive_login (username, logintime)                   VALUES ('$logname','$today')";           mysql_query($sql) or die("Can't execute query.");   echo "<meta http-equiv=\"refresh\" content=\"0;URL=Member_page.php\">"; exit();          }         else    // password is not correct              #43         {           unset($_GET['do']);                            #45           $message="<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'>The Login Name, '$_POST[fusername]'                     exists, but you have not entered the                     correct password! Please try again.<br></font>";           include("Includes/login_form.inc");                    #49         }       }                                                  #51       elseif ($num == 0)  // login name not found        #52       {          unset($_GET['do']);                              #54         $message = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'>The Login Name you entered does not                     exist! Please try again.<br></font>";         include("Includes/login_form.inc");       }     break;                                                #59     case "new":                                          #61       foreach($_POST as $field => $value)                #62       {         if (ereg("(Name)",$field))                        #75         {         if (!ereg("^[A-Za-z' -]{1,50}$",$value))         {           unset($_GET['do']);           $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $field is not a valid name.                             Please try again.<br></font>";           include("/Includes/login_form.inc");           exit();         }         }         $$field = strip_tags(trim($value));              #86       } // end foreach       if (!ereg("^[0-9)(xX -]{7,20}$",$corp_phone))            #96       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $corp_phone is not a valid phone number.                         Please try again.<br></font>";         include("Includes/login_form.inc");         exit();       }       if (!ereg("^.+@.+\\..+$",$corp_email))                  #115       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $corp_email is not a valid email address.                         Please try again.<br></font>";         include("Includes/login_form.inc");         exit();       }                                                  #122       /* check to see if login name already exists */       $connection = mysql_connect($host,$user,$password)                  or die ("Couldn't connect to server.");       $db = mysql_select_db($database, $connection)                 or die ("Couldn't select database.");       $sql = "SELECT username FROM getlive_members                 WHERE username='$newname'";       $result = mysql_query($sql)                 or die("Couldn't execute query.");       $num = mysql_numrows($result);       if ($num > 0)                                      #133       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $newname already used. Select another                         Member ID. <br></font>";         include("Includes/login_form.inc");         exit();       }       else                                              #141       {          $today = date("Y-m-d");                          #143         $sql = "INSERT INTO getlive_members (username,createDate,password,corp_name,corp_phone,corp_email) VALUES ('$newname','$today',password('$newpass'),'$corp_name','$corp_phone','$corp_email')";         mysql_query($sql);                              #150         $_SESSION['auth']="yes";                        #151         $_SESSION['logname'] = $newname;                #152         /* send email to new member */                  #153         $emess = "A new Member Account has been setup. ";         $emess.= "Your new Member ID and password are: ";         $emess.= "\n\n\t$newname\n\t$newpass\n\n";         $emess.= "We appreciate your interest in our Live Shows";         $emess.= " at GetLiveEvents.com. \n\n";         $emess.= "If you have any questions or problems,";         $emess.= " email support@getliveevents.com";         $ehead="From: member-desk@GetLiveEvents.com\r\n";    #161         $subj = "Your new Member Account from GetLiveEvents.com";         $mailsend=mail("$corp_email","$subj","$emess","$ehead");         header("Location: New_member.php");              #164       }     break;                                              #166     default:                                            #168         include("Includes/login_form.inc");   } ?>[/code] Thanks a MILLION to anyone that can help me achieve this as right now I'm completely lost in code.
  11. huge help.. it's always the little tiny errors that get me like that..
  12. [code] <? session_start();                                        # 7     if (@$_SESSION['auth'] != "yes")                        # 9   {     header("Location: Login.php");     exit();   } ?> <!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=iso-8859-1" /> <title>Live Streaming Concerts and MORE!</title> <style type="text/css"> <!-- body,td,th { color: #FFFFFF; } body { background-color: #000000; background-image: url(Images/bg_main.gif); background-repeat: repeat-x; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } a:link { color: #FFFF00; text-decoration: none; } a:visited { color: #FFCC00; text-decoration: none; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: bold; } .style2 {color: #FF0000} .style3 {color: #000000} --> </style></head> <body> <div align="center">   <table width="1000" height="100%" border="0" cellpadding="0" cellspacing="0">     <tr>       <td>&nbsp;</td>       <td width="102" height="163"><img src="Images/1.gif" width="102" height="163" /></td>       <td width="482" height="163"><img src="Images/2.gif" width="482" height="163" /></td>       <td width="233" height="163"><img src="Images/3.gif" width="233" height="163" /></td>       <td width="117" height="163"><img src="Images/4.gif" width="117" height="163" /></td>       <td>&nbsp;</td>     </tr>     <tr>       <td>&nbsp;</td>       <td width="102" height="77"><img src="Images/5.gif" width="102" height="77" /></td>       <td background="Images/6_bg.gif"><div align="center"><img src="Images/banner_top.jpg" width="468" height="60" /></div></td>       <td width="233" height="77"><img src="Images/7.gif" width="233" height="77" /></td>       <td width="117" height="77"><img src="Images/8.gif" width="117" height="77" /></td>       <td>&nbsp;</td>     </tr>     <tr>       <td width="32" height="40"><img src="Images/9.gif" width="32" height="40" /></td>       <td width="102" height="40"><img src="Images/10.gif" width="102" height="40" /></td>       <td width="482" height="40"><img src="Images/11.gif" width="482" height="40" /></td>       <td width="233" height="40"><img src="Images/12.gif" width="233" height="40" /></td>       <td width="117" height="40"><img src="Images/13.gif" width="117" height="40" /></td>       <td width="34" height="40"><img src="Images/14.gif" width="34" height="40" /></td>     </tr>     <tr>       <td width="32" height="80"><img src="Images/15.gif" width="32" height="80" /></td>       <td width="102" height="80"><img src="Images/16.gif" width="102" height="80" /></td>       <td height="80" colspan="2"><img src="Images/17.gif" width="715" height="80" /></td>       <td width="117" height="80"><img src="Images/18.gif" width="117" height="80" /></td>       <td width="34" height="80"><img src="Images/19.gif" width="34" height="80" /></td>     </tr>     <tr>       <td height="100%" background="Images/20_runner_BG.gif">&nbsp;</td>       <td height="100%" valign="top"><div align="right"><img src="Images/banner_left.jpg" width="100" height="487" /></div></td>       <td height="100%" colspan="2" valign="top" background="Images/bg_inner.gif"><div align="center"><br />             <table width="497" border="0" cellspacing="0" cellpadding="1">               <tr>                 <td bgcolor="#FFFFFF"><div align="center">                   <table width="495" border="0" cellspacing="0" cellpadding="2">                     <tr>                       <td bgcolor="#191919"><div align="center"><a href="http://www.getliveevents.com/Admin_index.php"><img src="Images/admin_main.jpg" alt="Admin" width="495" height="82" border="0" /></a></div></td>                     </tr>                                                         <tr>                       <td height="20" bgcolor="#666666"><div align="center" class="style1">Featured Show Editor </div></td>                     </tr>                     <tr>                       <td height="20" valign="middle" bgcolor="#363636">   <div align="center">   <?   echo "<form action='' method='post'>";     $username = "55555"; $password = "55555"; $database = "55555"; $host = "55555"; mysql_connect($host,$username,$password); @mysql_select_db($database) or die("Unable to select database"); $query = " SELECT * FROM Featured "; $result = mysql_query($query); $num = mysql_numrows($result); mysql_close(); // Check if the news item actually exists! if(!empty($num)) {     $subject    = mysql_result($result,0,"f_subject");     $body        = mysql_result($result,0,"f_body"); $cam_url    = mysql_result($result,0,"f_cam_url"); $time        = mysql_result($result,0,"f_time"); $image      = mysql_result($result,0,"f_image"); $status      = mysql_result($result,0,"status"); echo "     <table width='95%' border='0' cellspacing='0' cellpadding='2'>   <tr>     <td width='37%' class='style1'><div align='right'>Feature Name </div></td>     <td width='63%'><input name='subject' type='text' id='subject' value='$subject' size='45' maxlength='200' /></td>   </tr>   <tr>     <td valign='top' class='style1'><div align='right'>Description of Show </div></td>     <td><textarea name='textarea' cols='42' rows='5'>$body</textarea></td>   </tr>   <tr>     <td class='style1'><div align='right'>Feature Cam URL </div></td>     <td><input name='cam_url' type='text' id='cam_url' value='$cam_url' size='45' maxlength='200' /></td>   </tr>   <tr>     <td class='style1'><div align='right'>Scheduled Showtime</div></td>     <td><input name='time' type='text' id='time' value='$time' size='45' maxlength='200' /></td>   </tr>   <tr>     <td class='style1'><div align='right'>Image URL </div></td>     <td><input name='image' type='text' id='image' value='$image' size='45' maxlength='200' /></td>   </tr>   <tr>     <td class='style1'><div align='right'>Show Status 1=on 0=off </div></td>     <td><input name='status' type='text' value='$status' size='4' maxlength='1' /></td>   </tr>   <tr>     <td></td>     <td><input type='submit' name='Submit' value='Click to Update' /></td>   </tr> </table>         </form>";   ?>       </div>   </td>                     </tr>                     <tr>                       <td height="20" bgcolor="#FFFF00"><div align="center" class="style1"><span class="style3">SHOW CURRENT STATUS :</span> <span class="style2">OFFLINE </span></div></td>                     </tr>                   </table>                 </div></td>               </tr>             </table>             <br />                       <br />       </div></td>       <td height="100%" valign="top"><div align="right"><img src="Images/banner_right.jpg" width="100" height="487" /></div></td>       <td height="100%" background="Images/21_runner_BG.gif">&nbsp;</td>     </tr>   </table> </div> </body> </html>[/code]
  13. no dice... this is new non working code with revision (moved session start to beginning of file) [code]<?php session_start(); ?> <!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=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body,td,th { color: #FFFFFF; } body { background-color: #000000; background-image: url(Images/bg_main.gif); background-repeat: repeat-x; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } a:link { color: #FFFF00; text-decoration: none; } a:visited { color: #FFCC00; text-decoration: none; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <div align="center">   <table width="1000" height="100%" border="0" cellpadding="0" cellspacing="0">     <tr>       <td>&nbsp;</td>       <td width="102" height="163"><img src="Images/1.gif" width="102" height="163" /></td>       <td width="482" height="163"><img src="Images/2.gif" width="482" height="163" /></td>       <td width="233" height="163"><img src="Images/3.gif" width="233" height="163" /></td>       <td width="117" height="163"><img src="Images/4.gif" width="117" height="163" /></td>       <td>&nbsp;</td>     </tr>     <tr>       <td>&nbsp;</td>       <td width="102" height="77"><img src="Images/5.gif" width="102" height="77" /></td>       <td background="Images/6_bg.gif"><div align="center"><img src="Images/banner_top.jpg" width="468" height="60" /></div></td>       <td width="233" height="77"><img src="Images/7.gif" width="233" height="77" /></td>       <td width="117" height="77"><img src="Images/8.gif" width="117" height="77" /></td>       <td>&nbsp;</td>     </tr>     <tr>       <td width="32" height="40"><img src="Images/9.gif" width="32" height="40" /></td>       <td width="102" height="40"><img src="Images/10.gif" width="102" height="40" /></td>       <td width="482" height="40"><img src="Images/11.gif" width="482" height="40" /></td>       <td width="233" height="40"><img src="Images/12.gif" width="233" height="40" /></td>       <td width="117" height="40"><img src="Images/13.gif" width="117" height="40" /></td>       <td width="34" height="40"><img src="Images/14.gif" width="34" height="40" /></td>     </tr>     <tr>       <td width="32" height="80"><img src="Images/15.gif" width="32" height="80" /></td>       <td width="102" height="80"><img src="Images/16.gif" width="102" height="80" /></td>       <td height="80" colspan="2"><img src="Images/17.gif" width="715" height="80" /></td>       <td width="117" height="80"><img src="Images/18.gif" width="117" height="80" /></td>       <td width="34" height="80"><img src="Images/19.gif" width="34" height="80" /></td>     </tr>     <tr>       <td height="100%" background="Images/20_runner_BG.gif">&nbsp;</td>       <td height="100%" valign="top"><div align="right"><img src="Images/banner_left.jpg" width="100" height="487" /></div></td>       <td height="100%" colspan="2" valign="top" background="Images/bg_inner.gif"><div align="center"><?php /* Program: Login.php * Desc:    Login program for the Members Only section of the *          pet store. It provides two options: (1) login *          using an existing Login Name and (2) enter a new *          login name. Login Names and passwords are stored *          in a MySQL database. */                                         # 9   include("Includes/conn.php"); #10   switch (@$_GET['do'])                                  #11   {     case "login":                                        #13       $connection = mysql_connect($host, $user,$password) #14               or die ("Couldn't connect to server.");       $db = mysql_select_db($database, $connection)               or die ("Couldn't select database.");      #17       $sql = "SELECT username FROM getlive_admin               WHERE username='$_POST[fusername]'";      #20       $result = mysql_query($sql)                   or die("Couldn't execute query.");      #22       $num = mysql_num_rows($result);                    #23       if ($num == 1)  // login name was found            #24       {         $sql = "SELECT username FROM getlive_admin                 WHERE username='$_POST[fusername]'                 AND password=password('$_POST[fpassword]')";         $result2 = mysql_query($sql)                   or die("Couldn't execute query 2.");  #30         $num2 = mysql_num_rows($result2);         if ($num2 > 0)  // password is correct          #32         {           $_SESSION['auth']="yes";                      #34           $logname=$_POST['fusername'];           $_SESSION['logname'] = $logname;              #36           $today = date("Y-m-d h:i:s");                  #37           $sql = "INSERT INTO getlive_login (username, logintime)                   VALUES ('$logname','$today')";           mysql_query($sql) or die("Can't execute query.");           header("Location: Admin_index.php");          #41         }         else    // password is not correct              #43         {           unset($_GET['do']);                            #45           $message="<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'>The Login Name, '$_POST[fusername]'                     exists, but you have not entered the                     correct password! Please try again.<br></font>";           include("Includes/admin_login_form.inc");                    #49         }       }                                                  #51       elseif ($num == 0)  // login name not found        #52       {          unset($_GET['do']);                              #54         $message = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'>The Login Name you entered does not                     exist! Please try again.<br></font>";         include("Includes/admin_login_form.inc");       }     break;                                                #59     case "new":                                          #61       foreach($_POST as $field => $value)                #62       {         if (ereg("(Name)",$field))                        #75         {         if (!ereg("^[A-Za-z' -]{1,50}$",$value))         {           unset($_GET['do']);           $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $field is not a valid name.                             Please try again.<br></font>";           include("/Includes/admin_login_form.inc");           exit();         }         }         $$field = strip_tags(trim($value));              #86       } // end foreach       if (!ereg("^[0-9)(xX -]{7,20}$",$corp_phone))            #96       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $corp_phone is not a valid phone number.                         Please try again.<br></font>";         include("Includes/admin_login_form.inc");         exit();       }       if (!ereg("^.+@.+\\..+$",$corp_email))                  #115       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $corp_email is not a valid email address.                         Please try again.<br></font>";         include("Includes/admin_login_form.inc");         exit();       }                                                  #122       /* check to see if login name already exists */       $connection = mysql_connect($host,$user,$password)                  or die ("Couldn't connect to server.");       $db = mysql_select_db($database, $connection)                 or die ("Couldn't select database.");       $sql = "SELECT username FROM getlive_admin                 WHERE username='$newname'";       $result = mysql_query($sql)                 or die("Couldn't execute query.");       $num = mysql_numrows($result);       if ($num > 0)                                      #133       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $newname already used. Select another                         Member ID. <br></font>";         include("Includes/admin_login_form.inc");         exit();       }       else                                              #141       {          $today = date("Y-m-d");                          #143         $sql = "INSERT INTO getlive_admin (username,createDate,password,corp_name,corp_phone,corp_email) VALUES ('$newname','$today',password('$newpass'),'$corp_name','$corp_phone','$corp_email')";         mysql_query($sql);                              #150         $_SESSION['auth']="yes";                        #151         $_SESSION['logname'] = $newname;                #152         /* send email to new member */                  #153         $emess = "A new Member Account has been setup. ";         $emess.= "Your new Member ID and password are: ";         $emess.= "\n\n\t$newname\n\t$newpass\n\n";         $emess.= "We appreciate your interest in our Live Shows";         $emess.= " at GetLiveEvents.com. \n\n";         $emess.= "If you have any questions or problems,";         $emess.= " email support@getliveevents.com";         $ehead="From: member-desk@GetLiveEvents.com\r\n";    #161         $subj = "Your new Member Account from GetLiveEvents.com";         $mailsend=mail("$corp_email","$subj","$emess","$ehead");         header("Location: New_member.php");              #164       }     break;                                              #166     default:                                            #168         include("Includes/admin_login_form.inc");   } ?> </div></td>       <td height="100%" valign="top"><div align="right"><img src="Images/banner_right.jpg" width="100" height="487" /></div></td>       <td height="100%" background="Images/21_runner_BG.gif">&nbsp;</td>     </tr>   </table> </div> </body> </html> [/code]
  14. ok this is the dumbest thing I have come across in a while... the PHP code on itself works perfectly but when inserted into this page... it ceases to work. and by not working I mean it refreshes the page it's on (eg: http://www.getliveevents.com/Admin_login.php will become http://www.getliveevents.com/Admin_login.php?do=login after submit is pressed) [code]<!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=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body,td,th { color: #FFFFFF; } body { background-color: #000000; background-image: url(Images/bg_main.gif); background-repeat: repeat-x; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } a:link { color: #FFFF00; text-decoration: none; } a:visited { color: #FFCC00; text-decoration: none; } a:hover { text-decoration: underline; } a:active { text-decoration: none; } --> </style></head> <body> <div align="center">   <table width="1000" height="100%" border="0" cellpadding="0" cellspacing="0">     <tr>       <td>&nbsp;</td>       <td width="102" height="163"><img src="Images/1.gif" width="102" height="163" /></td>       <td width="482" height="163"><img src="Images/2.gif" width="482" height="163" /></td>       <td width="233" height="163"><img src="Images/3.gif" width="233" height="163" /></td>       <td width="117" height="163"><img src="Images/4.gif" width="117" height="163" /></td>       <td>&nbsp;</td>     </tr>     <tr>       <td>&nbsp;</td>       <td width="102" height="77"><img src="Images/5.gif" width="102" height="77" /></td>       <td background="Images/6_bg.gif"><div align="center"><img src="Images/banner_top.jpg" width="468" height="60" /></div></td>       <td width="233" height="77"><img src="Images/7.gif" width="233" height="77" /></td>       <td width="117" height="77"><img src="Images/8.gif" width="117" height="77" /></td>       <td>&nbsp;</td>     </tr>     <tr>       <td width="32" height="40"><img src="Images/9.gif" width="32" height="40" /></td>       <td width="102" height="40"><img src="Images/10.gif" width="102" height="40" /></td>       <td width="482" height="40"><img src="Images/11.gif" width="482" height="40" /></td>       <td width="233" height="40"><img src="Images/12.gif" width="233" height="40" /></td>       <td width="117" height="40"><img src="Images/13.gif" width="117" height="40" /></td>       <td width="34" height="40"><img src="Images/14.gif" width="34" height="40" /></td>     </tr>     <tr>       <td width="32" height="80"><img src="Images/15.gif" width="32" height="80" /></td>       <td width="102" height="80"><img src="Images/16.gif" width="102" height="80" /></td>       <td height="80" colspan="2"><img src="Images/17.gif" width="715" height="80" /></td>       <td width="117" height="80"><img src="Images/18.gif" width="117" height="80" /></td>       <td width="34" height="80"><img src="Images/19.gif" width="34" height="80" /></td>     </tr>     <tr>       <td height="100%" background="Images/20_runner_BG.gif">&nbsp;</td>       <td height="100%" valign="top"><div align="right"><img src="Images/banner_left.jpg" width="100" height="487" /></div></td>       <td height="100%" colspan="2" valign="top" background="Images/bg_inner.gif"><div align="center"><?php   session_start();                                        # 9   include("Includes/conn.php"); #10   switch (@$_GET['do'])                                   #11   {     case "login":                                         #13       $connection = mysql_connect($host, $user,$password) #14                or die ("Couldn't connect to server.");       $db = mysql_select_db($database, $connection)                or die ("Couldn't select database.");      #17       $sql = "SELECT username FROM getlive_admin               WHERE username='$_POST[fusername]'";       #20       $result = mysql_query($sql)                   or die("Couldn't execute query.");      #22       $num = mysql_num_rows($result);                     #23       if ($num == 1)  // login name was found             #24       {          $sql = "SELECT username FROM getlive_admin                  WHERE username='$_POST[fusername]'                  AND password=password('$_POST[fpassword]')";          $result2 = mysql_query($sql)                    or die("Couldn't execute query 2.");   #30          $num2 = mysql_num_rows($result2);          if ($num2 > 0)  // password is correct           #32          {            $_SESSION['auth']="yes";                       #34            $logname=$_POST['fusername'];            $_SESSION['logname'] = $logname;               #36            $today = date("Y-m-d h:i:s");                  #37            $sql = "INSERT INTO getlive_login (username, logintime)                    VALUES ('$logname','$today')";            mysql_query($sql) or die("Can't execute query.");            header("Location: Admin_index.php");           #41          }          else    // password is not correct               #43          {            unset($_GET['do']);                            #45            $message="<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'>The Login Name, '$_POST[fusername]'                      exists, but you have not entered the                      correct password! Please try again.<br></font>";            include("Includes/admin_login_form.inc");                     #49          }       }                                                   #51       elseif ($num == 0)  // login name not found         #52       {             unset($_GET['do']);                              #54          $message = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'>The Login Name you entered does not                      exist! Please try again.<br></font>";          include("Includes/admin_login_form.inc");       }     break;                                                #59     case "new":                                           #61       foreach($_POST as $field => $value)                 #62       {         if (ereg("(Name)",$field))                        #75         {          if (!ereg("^[A-Za-z' -]{1,50}$",$value))          {            unset($_GET['do']);            $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $field is not a valid name.                             Please try again.<br></font>";            include("/Includes/admin_login_form.inc");            exit();          }         }         $$field = strip_tags(trim($value));               #86       } // end foreach       if (!ereg("^[0-9)(xX -]{7,20}$",$corp_phone))            #96       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $corp_phone is not a valid phone number.                         Please try again.<br></font>";         include("Includes/admin_login_form.inc");         exit();       }       if (!ereg("^.+@.+\\..+$",$corp_email))                  #115       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $corp_email is not a valid email address.                          Please try again.<br></font>";         include("Includes/admin_login_form.inc");         exit();       }                                                  #122       /* check to see if login name already exists */       $connection = mysql_connect($host,$user,$password)                  or die ("Couldn't connect to server.");       $db = mysql_select_db($database, $connection)                 or die ("Couldn't select database.");       $sql = "SELECT username FROM getlive_admin                 WHERE username='$newname'";       $result = mysql_query($sql)                 or die("Couldn't execute query.");       $num = mysql_numrows($result);       if ($num > 0)                                      #133       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $newname already used. Select another                          Member ID. <br></font>";         include("Includes/admin_login_form.inc");         exit();       }       else                                               #141       {            $today = date("Y-m-d");                          #143         $sql = "INSERT INTO getlive_admin (username,createDate,password,corp_name,corp_phone,corp_email) VALUES ('$newname','$today',password('$newpass'),'$corp_name','$corp_phone','$corp_email')";         mysql_query($sql);                               #150         $_SESSION['auth']="yes";                         #151         $_SESSION['logname'] = $newname;                 #152         /* send email to new member */                   #153         $emess = "A new Member Account has been setup. ";         $emess.= "Your new Member ID and password are: ";         $emess.= "\n\n\t$newname\n\t$newpass\n\n";         $emess.= "We appreciate your interest in our Live Shows";         $emess.= " at GetLiveEvents.com. \n\n";         $emess.= "If you have any questions or problems,";         $emess.= " email support@getliveevents.com";         $ehead="From: member-desk@GetLiveEvents.com\r\n";     #161         $subj = "Your new Member Account from GetLiveEvents.com";         $mailsend=mail("$corp_email","$subj","$emess","$ehead");         header("Location: New_member.php");              #164       }     break;                                               #166     default:                                             #168         include("Includes/admin_login_form.inc");   } ?> </div></td>       <td height="100%" valign="top"><div align="right"><img src="Images/banner_right.jpg" width="100" height="487" /></div></td>       <td height="100%" background="Images/21_runner_BG.gif">&nbsp;</td>     </tr>   </table> </div> </body> </html>[/code] BELOW CODE IS WORKING CODE ON IT'S OWN [code]<?php /* Program: Login.php * Desc:    Login program for the Members Only section of the *          pet store. It provides two options: (1) login *          using an existing Login Name and (2) enter a new *          login name. Login Names and passwords are stored *          in a MySQL database. */   session_start();                                        # 9   include("Includes/conn.php"); #10   switch (@$_GET['do'])                                   #11   {     case "login":                                         #13       $connection = mysql_connect($host, $user,$password) #14                or die ("Couldn't connect to server.");       $db = mysql_select_db($database, $connection)                or die ("Couldn't select database.");      #17       $sql = "SELECT username FROM getlive_admin               WHERE username='$_POST[fusername]'";       #20       $result = mysql_query($sql)                   or die("Couldn't execute query.");      #22       $num = mysql_num_rows($result);                     #23       if ($num == 1)  // login name was found             #24       {          $sql = "SELECT username FROM getlive_admin                  WHERE username='$_POST[fusername]'                  AND password=password('$_POST[fpassword]')";          $result2 = mysql_query($sql)                    or die("Couldn't execute query 2.");   #30          $num2 = mysql_num_rows($result2);          if ($num2 > 0)  // password is correct           #32          {            $_SESSION['auth']="yes";                       #34            $logname=$_POST['fusername'];            $_SESSION['logname'] = $logname;               #36            $today = date("Y-m-d h:i:s");                  #37            $sql = "INSERT INTO getlive_login (username, logintime)                    VALUES ('$logname','$today')";            mysql_query($sql) or die("Can't execute query.");            header("Location: Admin_index.php");           #41          }          else    // password is not correct               #43          {            unset($_GET['do']);                            #45            $message="<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'>The Login Name, '$_POST[fusername]'                      exists, but you have not entered the                      correct password! Please try again.<br></font>";            include("Includes/admin_login_form.inc");                     #49          }       }                                                   #51       elseif ($num == 0)  // login name not found         #52       {             unset($_GET['do']);                              #54          $message = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'>The Login Name you entered does not                      exist! Please try again.<br></font>";          include("Includes/admin_login_form.inc");       }     break;                                                #59     case "new":                                           #61       foreach($_POST as $field => $value)                 #62       {         if (ereg("(Name)",$field))                        #75         {          if (!ereg("^[A-Za-z' -]{1,50}$",$value))          {            unset($_GET['do']);            $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $field is not a valid name.                             Please try again.<br></font>";            include("/Includes/admin_login_form.inc");            exit();          }         }         $$field = strip_tags(trim($value));               #86       } // end foreach       if (!ereg("^[0-9)(xX -]{7,20}$",$corp_phone))            #96       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $corp_phone is not a valid phone number.                         Please try again.<br></font>";         include("Includes/admin_login_form.inc");         exit();       }       if (!ereg("^.+@.+\\..+$",$corp_email))                  #115       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $corp_email is not a valid email address.                          Please try again.<br></font>";         include("Includes/admin_login_form.inc");         exit();       }                                                  #122       /* check to see if login name already exists */       $connection = mysql_connect($host,$user,$password)                  or die ("Couldn't connect to server.");       $db = mysql_select_db($database, $connection)                 or die ("Couldn't select database.");       $sql = "SELECT username FROM getlive_admin                 WHERE username='$newname'";       $result = mysql_query($sql)                 or die("Couldn't execute query.");       $num = mysql_numrows($result);       if ($num > 0)                                      #133       {         unset($_GET['do']);         $message_new = "<font color='#FFFFFF' size='1' face='Verdana, Arial, Helvetica, sans-serif'> $newname already used. Select another                          Member ID. <br></font>";         include("Includes/admin_login_form.inc");         exit();       }       else                                               #141       {            $today = date("Y-m-d");                          #143         $sql = "INSERT INTO getlive_admin (username,createDate,password,corp_name,corp_phone,corp_email) VALUES ('$newname','$today',password('$newpass'),'$corp_name','$corp_phone','$corp_email')";         mysql_query($sql);                               #150         $_SESSION['auth']="yes";                         #151         $_SESSION['logname'] = $newname;                 #152         /* send email to new member */                   #153         $emess = "A new Member Account has been setup. ";         $emess.= "Your new Member ID and password are: ";         $emess.= "\n\n\t$newname\n\t$newpass\n\n";         $emess.= "We appreciate your interest in our Live Shows";         $emess.= " at GetLiveEvents.com. \n\n";         $emess.= "If you have any questions or problems,";         $emess.= " email support@getliveevents.com";         $ehead="From: member-desk@GetLiveEvents.com\r\n";     #161         $subj = "Your new Member Account from GetLiveEvents.com";         $mailsend=mail("$corp_email","$subj","$emess","$ehead");         header("Location: New_member.php");              #164       }     break;                                               #166     default:                                             #168         include("Includes/admin_login_form.inc");   } ?>[/code]
×
×
  • 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.