Add to favorites HELP PLS & questions
21 posts by 4 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: April 5, 2010 (RSS)
By thenetgirl - March 11, 2010
when you click add to favorites it gives me an error http://www.rentalsincarmel.com/VacationRentalsDetail.php?245D-1
I am not sure what is suppose to go here -
$recordNum = $record['num']; // Update this with current record number
<?php
$tableOrTag = 'vacation_rentals'; // Update with your section's table name
$recordNum = $vacation_rentalsRecord['num']; // Update this with current record number
?>
I put this but i think its wrong cuz when i look in the back end it says I have 1
but when i look at http://www.rentalsincarmel.com/MyProfile.php it says
You don't have any favorites yet.
Thanks
www.thenetgirl.com
Re: [thenetgirl] Add to favorites HELP PLS & questions
By Chris - March 12, 2010
I'd like to try this out to see what error you're getting. Can you direct me to your signup form so I can login and try it?
Also, can you attach the full PHP source code for your VacationRentalsDetail.php page?
Chris
Re: [chris] Add to favorites HELP PLS & questions
By thenetgirl - March 12, 2010
www.thenetgirl.com
Re: [thenetgirl] Add to favorites HELP PLS & questions
By Chris - March 12, 2010
I'm pretty sure this problem is being caused by extra newlines and spaces being returned by your webserver. I'd like to take a closer look and see if I can fix things.
Could you please fill out a second-level support request with your FTP information and mention a link to this forum thread in the comment?
[url https://www.interactivetools.com/support/email_support_form.php]https://www.interactivetools.com/support/email_support_form.php[/url]
Chris
Re: [chris] Add to favorites HELP PLS & questions
By thenetgirl - March 15, 2010
www.thenetgirl.com
Re: [thenetgirl] Add to favorites HELP PLS & questions
By Chris - March 15, 2010
The problem was caused by extra newlines and spaces at the top of your VacationRentalsDetails.php page. It started like this:
<?php
require_once "/home/mtyrents/www/rentalsincarmel.com/cmsAdmin/lib/viewer_functions.php";
and I changed it to this:
<?php
require_once "/home/mtyrents/www/rentalsincarmel.com/cmsAdmin/lib/viewer_functions.php";
Now it seems to work.
You may want to check your other pages to make sure they don't start out with whitespace.
I hope this helps. Please let me know if you have any questions.
Chris
Re: [chris] Add to favorites HELP PLS & questions
By thenetgirl - March 16, 2010
I took out all extra code and still nothing I attached it.
www.thenetgirl.com
Re: [thenetgirl] Add to favorites HELP PLS & questions
By Chris - March 17, 2010
If you View Source, you can see the errors:
Notice: Undefined variable: recordNum in /home/mtyrents/www/rentalsincarmel.com/MyProfile.php on line 56
You'll want to change $recordNum to $record['num'], or add a line to set $recordNum just after your first foreach:
<?php foreach ($favoriteRecords as $record): ?>
<?php $recordNum = $record['num'] ?>
I hope this helps. Please let me know if you have any questions.
Chris