Support » Fixing WordPress » parse error

  • Hi all

    I have been working on dynamic pages that will fetch content from datbase and show it up in databas eusing id from querystring.

    i have implemented below two file in wordpres but it is showing parse error as below,

    include 'test2.php';
    $val = $_GET['id'];
    $parts = str_split($val, $split_length = 1);
    $query="SELECT * FROM data WHERE <code>id</code> = $parts[$i]" ;
    $result=mysql_query($query) or trigger_error(mysql_error().$query);;
    if (!$result) { // add this check.
        die('Invalid query: ' . mysql_error());
    $data = mysql_fetch_array($result);
    	echo '<div><h1 style="font-family: myriad pro light;color:#EE3D96;font-size: 45px;font-weight: bolder;" align="">' . $data["name"] . '</h3></div>';
    	echo '<div><p style="font-size: 19px;line-height: 18px;color: #827B72;width: 193px;">' . $data["text"] . '</p><div>';
    	echo '<div style="width: 580px;margin-left: 202px;margin-top: -182px;"><img src="images/'.$data["image"].'" /></div>';
    $con = mysql_connect("localhost","elemental","");
    if (!$con)
      die('Could not connect: ' . mysql_error());

    Parse error: syntax error, unexpected ‘<’ in C:\wamp\www\wordpress\wp-content\plugins\exec-php\includes\runtime.php(42) : eval()’d code on line 32

  • The topic ‘parse error’ is closed to new replies.