Parse error : syntax error , unexpected '=' in.....conn.php

Discussion in 'PHP' started by netmaxin123, Jun 29, 2007.

  1. #1
    Hello Dear Friends
    I am facing a issue as follows when I am setting up DB

    Parse error: syntax error, unexpected '=' ......projects/jobsblue/conn.php on line 11

    And My conn.php is as follows
    ===========conn.php===============================
    <?

    $db_host = "localhost";
    $db_username = "db_user";
    $db_password = "password";
    $db_name = "db_name";
    $site_name = "mydomain.com";
    $site_title = "My Career Site";
    $url = "http://www.yourdomain.com";

    ///////////////////////////

    $connection = mysql_connect($db_host, $db_username, $db_password) or die(mysql_error());
    $db = mysql_select_db($db_name, $connection);


    $qset = "select * from job_settings";
    $rset = mysql_query($qset) or die(mysql_error());
    $aset = mysql_fetch_array($rset);


    ?>

    Please help me this , Thanks a many in advance
     
    netmaxin123, Jun 29, 2007 IP
  2. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #2
    i don't see anything wrong with it.
     
    ansi, Jun 29, 2007 IP
  3. veckd

    veckd Peon

    Messages:
    1,065
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #3
    looks good to me too
     
    veckd, Jun 29, 2007 IP
  4. Acecool

    Acecool Peon

    Messages:
    267
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Copy + Paste = works fine..
     
    Acecool, Jun 29, 2007 IP
  5. lochoe

    lochoe Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've the same issue here...

    Try to get this code working (i'm learning php just by luck)

    <?php 
    
    $query = "SELECT * FROM #__ezrealty_locality WHERE id = $cityid";
    
        $database->setQuery( $query );
        
        $locrows = $database->loadObjectList();
    
        if ($database->getErrorNum()) {
    
            echo $database->stderr();
    
            return false;
        }
        
        echo"
        <table>
        <tr>
             <th>City List</th>
        </tr>
        
        while($locrows = mysql_fetch_array($query)){
        extract($locrows);
        echo"
        <tr>
             <td>$cityid</td>
        </tr>";
        }
        echo"</table>";  /*ERROR HERE*/
        
    ?>
    PHP:
    and i get this error..
    Parse error: syntax error, unexpected '>' in */testloc.php on line 27

    pls need help

    I want it will look like this

    City List
    city 1
    city 2
    city 3
    city 4
     
    lochoe, Nov 11, 2008 IP
  6. iDemonix

    iDemonix Peon

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    lochoe, look at the syntax highlighting on the forum, you're not closing an echo double quote properly :)
     
    iDemonix, Nov 11, 2008 IP
  7. lochoe

    lochoe Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thanx iDemonix,

    i just write using textpad, so the syntax does not look really well with that..

    i'm gonna use rapid php , since my friend suggest that application..

    anyway, i'm really2 newbie in php.. very chicken..
    thanx for ur reply
     
    lochoe, Nov 12, 2008 IP