# Php syntax error

**URL:** https://forum.kirupa.com/t/php-syntax-error/250858
**Category:** Uncategorized
**Created:** [February 2, 2008, 7:54am UTC](https://forum.kirupa.com/t/php-syntax-error/250858 "2008-02-02T07:54:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hollyolly84](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@hollyolly84](https://forum.kirupa.com/u/hollyolly84)
#### Post date: [February 2, 2008, 7:54am UTC](https://forum.kirupa.com/t/php-syntax-error/250858/1 "2008-02-02T07:54:17Z")

</div>

Hi,  
I’m trying to do this tutorial to do a blog in flash. [http://www.webmonkey.com/webmonkey/03/40/index0a.html?tw=programming](http://www.webmonkey.com/webmonkey/03/40/index0a.html?tw=programming)

When I get to the php section It’s not working. I’m trying to import the php file with phpmyadmin and I keep getting an error.

#1064 - 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 ‘\<?php  
mysql\_pconnect (“yourHost”, “yourUserName”, “yourPassword”)’ at line 1

My code is:

\<?php  
mysql\_pconnect (“yourHost”, “yourUserName”, “yourPassword”);

mysql\_select\_db (“blog\_db”);  
$qResult = mysql\_query (“SELECT \* FROM blog\_entries ORDER BY id DESC”);

$nRows = mysql\_num\_rows($qResult);  
$rString ="&n=".$nRows;

for ($i=0; $i\< $nRows; $i++){  
$row = mysql\_fetch\_array($qResult);  
$rString .="&id".$i."=".$row[‘id’]."&"."&title".$i."=".$row[‘title’]."&"."&date".$i."=".$row[‘date’]."&"."&entry".$i."=".$row[‘entry’]."&";  
}  
echo $rString."&";

?\>

Obviously I didn’t put my username and password on here :-P.  
Anyway, I’ve never used databases or php before but I was using this tutorial to learn but this part isn’t working. I read that someone else tried doing the same tutorial and they went from text edit on mac to puretext and it fixed it. I have a mac so I don’t think I can use pure edit. I tried something called text mate and that’s not working either. If anyone could help me i’d really appreciate it. I’m really trying to learn this stuff and a lot of the books on it are really complicated. This tutorial was good until this part.

Holly

Thank you ahead of time.
