Jump to content

Genesis730

Members
  • Posts

    96
  • Joined

  • Last visited

Posts posted by Genesis730

  1. well is the lines concerning lines 101 (it's 100 & 101)

     

    <?php

    echo $loginObject->getMainMenuTitle('Registration');

    ?>

     

    looks to me like you need to escape the 'Registration'  because the echo is thinkin the ' is a quote such as

    echo "HELLO WORLD!";

     

    so try this

     

    <?php

    echo $loginObject->getMainMenuTitle(\'Registration\');

    ?>

     

    OR

     

    <?php

    echo "$loginObject->getMainMenuTitle('Registration')";

    ?>

     

    OR EVEN

     

    <?php

    echo "$loginObject->getMainMenuTitle(\'Registration\')";

    ?>

    maybe?? lemme know how that works

    haha you can tell i'm no expert at PHP either. I have a little experience and try to help but it's mostly trial and error :D

  2. ONLY think I don't get is what is the value of $emailMessage?? You put it in the email(.....) but I don't see it anywhere else on the page? Just to let you know

     

    COPY & PASTE this as home.php

    <?php
    require_once('init.php');
    $loadClass = SB_Modules::loadClass('Modules_Login');
    $loginObject = new Modules_Login('9sny8aqp0jl');
    $loginObject->init();
    $loginObject->processAction();
    
    if($_POST['Submit']) {
    
    //COLLECT DATA
      $name = $_POST['name'];
      $location = $_POST['location'];
      $phone = $_POST['phone'];
      $customer_mail = $_POST['customer_mail'];
    
    //ERROR CHECKING
    $error = '';
    
    if (!$name)
    	$error = $error."<b>Full Name</b>";
    if (!$location)
    	$error = $error."<b>City, State</b>";
    if (!$phone)
    	$error = $error."<b>Phone Number</b>";
    if (!$customer_mail)         
    	$error = $error."<b>Email Address</b>";
    
    if ($error!="")
    	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
    else
      	{
    //SUBMIT & REDIRECT
    mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" );
    header( "Location: http://gkicredit.com/thankyou.php" );
    
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>GKI Credit Repair - Home</title><meta name="DESCRIPTION" content=""><meta name="KEYWORDS" content="Credit Repair"><meta name="GENERATOR" content="Parallels Plesk Sitebuilder 4.5.0"><link href="css/styles.css?template=business-019&colorScheme=green&header=headers1&button=buttons3" rel="stylesheet" type="text/css"></head><BODY MARGINHEIGHT="0" MARGINWIDTH="0" TOPMARGIN="0" RIGHTMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0"><TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" class="main-bg" style="width: 100%; height: 100%;" summary=""><TR><TD height="241" style="background-image: url('images/header_bg.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3');"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%; background-image: url('images/header.jpg?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-position: top right; background-repeat: no-repeat;"><tr><td style="background-image: url('images/header_l.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-position: top left; background-repeat: no-repeat;"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr><td height="80" colspan="2" style="padding: 0 145px 0 60px;"><table cellpadding="0" cellspacing="0" align="center" summary="" bgcolor="#1F2024"><tr><td width="30"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="Home.php" class="amenu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Home</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="registration.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br><?php
    echo $loginObject->getMainMenuTitle('Registration');
    ?></a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="services.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Services</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="News.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>News and Events</a></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td><img src="images/separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="10"><div style="width:5px; height:0px;"><span></span></div></td><td align="center"><a href="contact.php" class="menu"><img src="images/bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""><br>Contact Us</a></td><td width="30"><div style="width:5px; height:0px;"><span></span></div></td></tr></table></td></tr><tr><td width="100%" height="100%" style="padding: 5px 90px 5px 65px;"><table cellpadding="0" cellspacing="0" border="0" summary="" align="center"><tr><td style="padding-right: 15px;"><a href="./"><img src="images/logo.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td class="company">GKI Credit Repair</td></tr></table></td><td align="center" class="slogan" style="padding: 80px 220px 0 0;">Call Now For Free Consolidation! 1.888.992.9090<div style="width:165px; height:0px;"><span></span></div></td></tr></table></td></tr></table></TD></TR><TR><TD height="1" bgcolor="#636366"></TD></TR><TR><TD height="100%" name="SB_stretch" valign="top"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr valign="top"><td><div style="width:59px; height:0px;"><span></span></div></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td style="padding-top: 30px;"><table cellpadding="0" cellspacing="0" width="204" align="center" summary=""><tr><td style="padding-right: 15px;"><a href="About.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="About.php" class="submenu">About Us</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="Feedack.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="Feedack.php" class="submenu">Feedback</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FAQ.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FAQ.php" class="submenu">Frequently Asked Questions</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FCRAct.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FCRAct.php" class="submenu">Fair Credit Reporting Act</a></td></tr><tr><td></td><td height="20"><div style="height:1px; background-color: #4C4D50; background-image: url('images/submenu_hr.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3'); background-repeat: repeat-x;"><span></span></div></td></tr><tr><td style="padding-right: 15px;"><a href="FDCPAct.php"><img src="images/submenu_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></a></td><td style="width: 100%;"><a href="FDCPAct.php" class="submenu">Fair Debt Collection Practices Act</a></td></tr></table><div style="width:253px; height:0px;"><span></span></div></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td width="100%" class="pageContent" style="padding: 20px;"><table cellpadding="0" cellspacing="0" border="0" summary=""><tr><td class="text-header" style="padding-right: 5px;">Home</td><td><img src="images/txtheader_bullet.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td></tr></table><div style="width:0px; height:15px;"><span></span></div><span style="color: #fffafa">
    <div><span style="font-size: small">
    <div>
    <div>
    <div>
    <div>
    <div> </div>
    </div>
    </div>
    <table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr>
    <td><strong>Contact Form </strong></td>
    </tr>
    </table>
    
    <table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
    <tr>
    <td><form method="post" action="home.php">
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr>
    <td width="16%">Full Name</td>
    <td width="2%">:</td>
    <td width="82%"><input name="name" type="text" id="name" size="50"></td>
    </tr>
    <tr>
    <td>City, State</td>
    <td>:</td>
    <td><input name="location" type="text" id="location" size="50"></td>
    </tr>
    <tr>
    <td>Phone Number</td>
    <td>:</td>
    <td><input name="phone" type="text" id="phone" size="50"></td>
    </tr>
    <tr>
    <td>Email</td>
    <td>:</td>
    <td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td><input type="submit" name="Submit" value="Submit"> </td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table></div>
    </div>
    <div> </div>
    <br />
    <br />
    GKI Credit is a consumer advocacy firm, not an online credit repair shop. Helping consumers take action on their credit. We are one of the few 100% legal credit restoration firms in North America. Our founder has over 20 years experience and our organization has had zero complaints.<br />
    <br />
    <span style="color: #e0c398"><strong>• Removal of Questionable, Negative and Derogatory Items!</strong></span></span></div>
    <p><span style="font-size: small"><span style="color: #fffafa">Most of our competitors only write dispute letters which seldom have any effect and is something you, the consumer can do for free. We have information that allows us remove your questionable, negative and derogatory items.<br />
    <br />
    <span style="color: #e0c398"><strong>• Deletion Warranty!</strong></span> </span></span></p>
    <p><span style="font-size: small"><span style="color: #fffafa">Nothing could be better than knowing that once we have removed the questionable, negative and derogatory items from your credit reports, if by chance these items should ever reappear, we will remove them again at no additional charge to you. Most of our competitors only use the dispute letter process and if by chance they get something removed, 80% of the time it will go back on your credit reports within two to six months.</span></span></p>
    </span><br/><br type="_moz" /></td><td bgcolor="#636366"><div style="width:1px; height:0px;"><span></span></div></td><td><div style="width:60px; height:0px;"><span></span></div></td></tr></table></TD></TR><TR><TD height="1" bgcolor="#636366"></TD></TR><TR><TD height="70"><table cellpadding="0" cellspacing="0" border="0" summary="" style="width: 100%; height: 100%;"><tr><td><img src="images/footer_l.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td><td width="100%"><table cellpadding="0" cellspacing="0" align="center" summary=""><tr><td width="30"><div style="width:5px; height:0px;"><span></span></div></td><td><a href="Home.php" class="abmenu" id="abmenu">Home</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="registration.php" class="bmenu" id="bmenu2"><?php
    echo $loginObject->getMainMenuTitle('Registration');
    ?></a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="services.php" class="bmenu" id="bmenu3">Services</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="News.php" class="bmenu" id="bmenu4">News and Events</a></td><td width="5"></td><td><img src="images/bmenu_separator.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" alt="" style="margin: 0px 5px 0px 5px;"></td><td width="5"></td><td><a href="contact.php" class="bmenu" id="bmenu5">Contact Us</a></td><td width="30"><div style="width:5px; height:0px;"><span></span></div></td></tr></table><div style="width:0px; height:10px;"><span></span></div><div align="center" class="footer">Where you never have to look back</div></td><td><img src="images/footer_r.gif?template=business-019&colorScheme=green&header=headers1&button=buttons3" border="0" alt=""></td></tr></table></TD></TR></TABLE></BODY></HTML>
    

  3. Any better??

     

    if($username > 0 && $email > 0){
      $query = mysql_query("SELECT * FROM Users WHERE Username = '$username'") or trigger_error("Query failed: ".mysql_error());
    
    if(mysql_num_rows($query) > 0) {
      $row = mysql_fetch_array($query);
      if($username != $row['Username'])
        {
          $error['username'] = '<span style="color:red;">The entered Username is not registered!</span>';
        }
    
      elseif($email != $row['Email'])
        {
          $error['email'] = '<span style="color:red;">The entered Email is not the registered email!</span>';
        }
    }
    }
    

  4. $days = time() -  60*60*24*7  // 7 DAYS

    $sql="SELECT folder FROM photos WHERE published=3 AND timestamp > $days";

     

    maybe this is better??

    I wrote it on the fly and isn't tested but looks right to me (most things that fail do work in my head but i'm tryin :D)

  5. Just looking at it quick so I might be wrong but wouldn't you need

    My code MIGHT not be correct syntax but you get the idea

     

    if($email == $row['Email']) {}
      else{
        $error['email'] = '<span style="color:red;">The entered Email is not the registered email!</span>';
             }
      else if($username== $row['Username']) {}
      else{
            $error['username'] = '<span style="color:red;">The entered Username is not registered!</span>';
             }
    }
    

  6. SO I wrote this code on the fly but it's PHP and HTML all on one page and SHOULD work but like I said, not tested...

    This page MUST be named "form.php" or else you need to change <form action="form.php">  (it submits to itself since the processing PHP is within the page)

     

    
    <html>
    <body>
    
    <?php
    if($_POST['Submit']) {
    
    //COLLECT DATA
      $name = $_POST['name'];
      $location = $_POST['location'];
      $phone = $_POST['phone'];
      $customer_mail = $_POST['customer_mail'];
    
    //ERROR CHECKING
    $error = '';
    
    if (!$name)
    	$error = $error."<b>Full Name</b>";
    if (!$location)
    	$error = $error."<b>City, State</b>";
    if (!$phone)
    	$error = $error."<b>Phone Number</b>";
    if (!$customer_mail)         
    	$error = $error."<b>Email Address</b>";
    
    if ($error!="")
    	echo "<font color='#FF0000'><font size='4'>Please fill out all required fields</font><br />$error</font>";
    else
      	{
    //SUBMIT & REDIRECT
    mail( "virtuouse@gmail.com", "Contact Form Results", $emailMessage, "$name <$email>" );
    header( "Location: http://gkicredit.com/thankyou.php" );
    
    
    ?>
    
    <table width="400" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr>
    <td><strong>Contact Form </strong></td>
    </tr>
    </table>
    
    <table width="400" border="0" align="center" cellpadding="0" cellspacing="1">
    <tr>
    <td><form method="post" action="form.php">
    <table width="100%" border="0" cellspacing="1" cellpadding="3">
    <tr>
    <td width="16%">Full Name</td>
    <td width="2%">:</td>
    <td width="82%"><input name="name" type="text" id="name" size="50"></td>
    </tr>
    <tr>
    <td>City, State</td>
    <td>:</td>
    <td><input name="location" type="text" id="location" size="50"></td>
    </tr>
    <tr>
    <td>Phone Number</td>
    <td>:</td>
    <td><input name="phone" type="text" id="phone" size="50"></td>
    </tr>
    <tr>
    <td>Email</td>
    <td>:</td>
    <td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
    </tr>
    <tr>
    <td> </td>
    <td> </td>
    <td><input type="submit" name="Submit" value="Submit"> </td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table>
    
    
    send_contactnew.php:
    
    <?php
    
      if (!isset($_POST['customer_mail'])) {
        header( "Location: http://gkicredit.com/" );
      }
      elseif (empty($email) || empty($phone)) {
        header( "Location: http://gkicredit.com/error.php" );
      }
      else {
        mail( "virtuouse@gmail.com", "Contact Form Results",
          "$name\nLocation? $location\n",
          "From: $name <$email>" );
        header( "Location: http://gkicredit.com/thankyou.php" );
      }
    ?>
    
    

  7. I would start off with a nice template before getting anywhere... After you have a decent looking site (doesn't have to be perfect) add a login...

     

    To do this you need PHP and a MySQL database (first name, last name, username, password (2x for verification), email address, and about me seems like what you are looking for)

    After that create the table on MySQL (probably MyPHPAdmin is the link you're looking for as most sites use cPanel)

     

    I can give a decent start if you post your site code so I can work using your site design...

  8. I have checked my PHP info and found that safe mode is infact off, however the basedir is set to /home/:/usr/lib/php:/tmp  <---- that's my problem :(

     

    So is there any way within the code to change that or is there any workaround?

  9. So here is my code... I got it off of here...

    Because I'm completely new to cURL, just wanna get a page that requires a login... I wrote everything word for word and got my own values for the two functions and get this error...

     

    "Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/a5623324/public_html/cURL/curlML.php on line 24"

     

    here's all my code except for the login scripts (obvious reasons)

    <?
    //LOGIN INFORMATION WAS DELETED FROM HERE
    
    function curl_login($url,$data,$proxy,$proxystatus){
        $fp = fopen("cookie.txt", "w");
        fclose($fp);
        $login = curl_init();
        curl_setopt($login, CURLOPT_COOKIEJAR, "cookie.txt");
        curl_setopt($login, CURLOPT_COOKIEFILE, "cookie.txt");
        curl_setopt($login, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
        curl_setopt($login, CURLOPT_TIMEOUT, 40);
        curl_setopt($login, CURLOPT_RETURNTRANSFER, TRUE);
        if ($proxystatus == 'on') {
            curl_setopt($login, CURLOPT_SSL_VERIFYHOST, FALSE);
            curl_setopt($login, CURLOPT_HTTPPROXYTUNNEL, TRUE);
            curl_setopt($login, CURLOPT_PROXY, $proxy);
        }
        curl_setopt($login, CURLOPT_URL, $url);
        curl_setopt($login, CURLOPT_HEADER, TRUE);
        curl_setopt($login, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
        curl_setopt($login, CURLOPT_FOLLOWLOCATION, TRUE);
        curl_setopt($login, CURLOPT_POST, TRUE);
        curl_setopt($login, CURLOPT_POSTFIELDS, $data);
        ob_start();      // prevent any output
        return curl_exec ($login); // execute the curl command
        ob_end_clean();  // stop preventing output
        curl_close ($login);
        unset($login);    
    }                  
    
    function curl_grab_page($site,$proxy,$proxystatus){
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
        if ($proxystatus == 'on') {
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
            curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
            curl_setopt($ch, CURLOPT_PROXY, $proxy);
        }
        curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
        curl_setopt($ch, CURLOPT_URL, $site);
        ob_start();      // prevent any output
        return curl_exec ($ch); // execute the curl command
        ob_end_clean();  // stop preventing output
        curl_close ($ch);
    }
    
    ?>
    

     

    LINE 24: "  curl_setopt($login, CURLOPT_FOLLOWLOCATION, TRUE);  "

  10. Oh, I wrote it wrong, the new error is

     

    "Notice: 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 'optimize, repair, setup, os, backup, questions, miles, paid FROM contact' at line 1"

  11. I did what you suggested Andy-H and got this error

    "Notice: 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 'optimize, repair, setup, os, backup, questions, miles, paid FROM contact ORDER B' at line 1"

     

    $res = mysql_query("SELECT id, date, firstname, lastname, primaryphone, secondaryphone, address, city, state, zip, emailaddress, diagnostic, virus, optimize, repair, setup, os, backup, questions, miles, paid FROM contact ORDER BY date");
    

    WAS CHANGED TO

    $res = mysql_query("SELECT id, date, firstname, lastname, primaryphone, secondaryphone, address, city, state, zip, emailaddress, diagnostic, virus, optimize, repair, setup, os, backup, questions, miles, paid FROM contact ORDER BY date") or trigger_error(mysql_error());
    

     

  12. I posted this a little bit ago, and was told to change a row field from "primary" to something else since primary is a key word... here is my updated code, i still get the same error...

     

    "Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource"

     

    <table cellspacing="0" cellpadding="0" border="1">
      <tr>
        <td>ID</td><td>Name</td><td>Primary #</td><td>Secondary #</td><td>Address</td><td>City</td><td>Arizona</td><td>ZIP</td><td>Email Address</td><td>Diagnostic</td><td>Virus</td><td>Optimize</td><td>Repair</td><td>Setup</td><td>OS</td><td>Backup</td><td>Questions</td><td>Miles</td><td>Paid</td>
      </tr>
    <?PHP
       $res = mysql_query("SELECT id, date, firstname, lastname, primaryphone, secondaryphone, address, city, state, zip, emailaddress, diagnostic, virus, optimize, repair, setup, os, backup, questions, miles, paid FROM contact ORDER BY date");
    
       while ($row = mysql_fetch_assoc($res)) {
          echo "<tr><td>{$row['id']}</td><td>{$row['firstname']} {$row['lastname']}</td><td>{$row['primaryphone']}</td><td>{$row['secondaryphone']}</td><td>{$row['address']}</td><td>{$row['city']}</td><td>{$row['state']}</td><td>{$row['zip']}</td><td>{$row['emailaddress']}</td><td>{$row['diagnostic']}</td><td>{$row['virus']}</td><td>{$row['optimize']}</td><td>{$row['repair']}</td><td>{$row['setup']}</td><td>{$row['os']}</td><td>{$row['backup']}</td><td>{$row['questions']}</td><td>{$row['miles']}</td><td>{$row['paid']}</td></tr>";
       }
    ?>
    
    </table>
    

  13. how exactly would I modify the code??

    Here's what I changed it to...

     

    <table cellspacing="0" cellpadding="0" border="1">
      <tr>
        <td>Name</td><td>Primary #</td><td>Secondary #</td><td>Address</td><td>City</td><td>Arizona</td><td>ZIP</td><td>Email Address</td><td>Diagnostic</td><td>Virus</td><td>Optimize</td><td>Repair</td><td>Setup</td><td>OS</td><td>Backup</td><td>Questions</td><td>Miles</td><td>Paid</td>
      </tr>
    <?PHP
       $res = mysql_query("SELECT id, firstname, lastname, `primary`, secondary, address, city, zip, emailaddress, diagnostic, virus, optimize, repair, setup, os, backup, questions, miles, paid FROM contact ORDER BY date");
    
       while ($row = mysql_fetch_assoc($res)) {
          echo "<tr><td>{$row['firstname']} {$row['lastname']}</td><td>{$row[`primary`]}</td><td>{$row['secondary']}</td><td>{$row['address']}</td><td>{$row['city']}</td><td>Arizona</td><td>{$row['zip']}</td><td>{$row['emailaddress']}</td><td>{$row['diagnostic']}</td><td>{$row['virus']}</td><td>{$row['optimize']}</td><td>{$row['repair']}</td><td>{$row['setup']}</td><td>{$row['os']}</td><td>{$row['backup']}</td><td>{$row['questions']}</td><td>{$row['miles']}</td><td>{$row['paid']}</td></tr>";
       }
    ?>
    
    </table>
    

  14. Anyone see why this wouldn't echo my table onto a webpage?

     

    <table cellspacing="0" cellpadding="0" border="1">
      <tr>
        <td>Name</td><td>Primary #</td><td>Secondary #</td><td>Address</td><td>City</td><td>Arizona</td><td>ZIP</td><td>Email Address</td><td>Diagnostic</td><td>Virus</td><td>Optimize</td><td>Repair</td><td>Setup</td><td>OS</td><td>Backup</td><td>Questions</td><td>Miles</td><td>Paid</td>
      </tr>
    <?PHP
       $res = mysql_query("SELECT id, firstname, lastname, primary, secondary, address, city, zip, emailaddress, diagnostic, virus, optimize, repair, setup, os, backup, questions, miles, paid FROM contact ORDER BY date");
    
       while ($row = mysql_fetch_assoc($res)) {
          echo "<tr><td>{$row['firstname']} {$row['lastname']}</td><td>{$row['primary']}</td><td>{$row['secondary']}</td><td>{$row['address']}</td><td>{$row['city']}</td><td>Arizona</td><td>{$row['zip']}</td><td>{$row['emailaddress']}</td><td>{$row['diagnostic']}</td><td>{$row['virus']}</td><td>{$row['optimize']}</td><td>{$row['repair']}</td><td>{$row['setup']}</td><td>{$row['os']}</td><td>{$row['backup']}</td><td>{$row['questions']}</td><td>{$row['miles']}</td><td>{$row['paid']}</td></tr>";
       }
    ?>
    
    </table>
    

     

    The error message I get is "Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource "

  15. I don't disagree with MadTechie, but also make sure you are editing the correct file and not a duplicate copy siting somewhere else on your hard drive or server space. I've made that mistake once or twice in my day... Darn source code wouldn't change because i was editing the wrong file =]

×
×
  • 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.