Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Instant Website: Realty/Listings/Auto:
First timer needs help getting right code onto page

 

 


joelinsk
New User

Mar 23, 2009, 12:57 PM

Post #1 of 5 (2273 views)
Shortcut
First timer needs help getting right code onto page Can't Post

I have never used a database before, but I have succesfully set up my first mysql database, and successfully installed INstant Realty Web site. I then created my first listing and am now trying to test the appearance of listing on a page in my site.

1. I created a php page called listings on my site and uploaded
2. I saved the code form the code generator as listingsList.php and uploaded
3. I took the header php code from generator and pasted into head of my listings.php page
4. I took listings php code from the generator and pasted into body of my page
5. Uploaded and got a parse error:
Parse error: parse error, unexpected $ in /home/content/T/M/P/TMP4hrec/html/listings.php on line 156

page can be viewed here: http://www.heartlandre.net/listings.php

Any advice or help would be greatly appreciated.
I already have a site designed, and am simply trying to use this software to manage my listings- create code for my pages, and have those database listings appear in my pages.


joelinsk
New User

Mar 23, 2009, 1:25 PM

Post #2 of 5 (2270 views)
Shortcut
Re: [joelinsk] First timer needs help getting right code onto page [In reply to] Can't Post

incidentally, as I continue to edit the page I notice the error line # changing and it's always equal to the last line of the page:
</html>


Dave
Staff / Moderator


Mar 24, 2009, 11:23 AM

Post #3 of 5 (2244 views)
Shortcut
Re: [joelinsk] First timer needs help getting right code onto page [In reply to] Can't Post

Hi joelinsk, welcome to the forum!

First thing, if you're using Instant Realty Website there should be a set of templates already configured for you in /simple/. It may be easier to start with those then to start from scratch.

Next, you can certainly create new pages with the code generator. The first thing is to make sure your HTML editor isn't modifying or breaking the PHP code when you copy and paste. Sometimes this happens and you need to adjust a setting in the HTML editor program to allow PHP.

You can test this by creating a simple PHP page called hello.php that has this content:
<?php echo "Hello World" ?>

If that doesn't work it's a good sign your editor needs adjusting to allow for PHP. If it does we can check other things.

If you can attach your listings.php file to this thread I can take a look at it and tell you what the problem is.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com
 


joelinsk
New User

Mar 24, 2009, 12:39 PM

Post #4 of 5 (2240 views)
Shortcut
Re: [Dave] First timer needs help getting right code onto page [In reply to] Can't Post

I have just finished building the new site for this company and was hoping to use this database to simply pull in or include my listings on the pages I have already designed. I don't really want to use all the features of this software- I don't want search, detail or any of that. I'd like to have a back-end solution for them to add properties and then based on the code I have on their listings page, display those listings. Is this possible?

My listing.php file is attached- I use dreamweaver. Long story but this is being tested on old site, until new site is ready for launch. The new site can be previewed here. It's not .php but I don't see why I can't change it.
http://www.thinstick.net

Thanks Dave for any help you can provide.
Attachments: listings.php (4.23 KB)


Dave
Staff / Moderator


Mar 25, 2009, 9:57 AM

Post #5 of 5 (2211 views)
Shortcut
Re: [joelinsk] First timer needs help getting right code onto page [In reply to] Can't Post

That's no problem, you can create just the viewers you need even without the sample templates.

It looks like the endforeach tag got erased from your file. Search for "foreach" and add this tag back in below the lines you want displayed for each listing:
<?php endforeach ?>

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com