Skip to main content
September 4, 2009
Answered

parse errors from server behaviors

  • September 4, 2009
  • 1 reply
  • 495 views

I have created an input form for a mysql/php database set up on my testing server with a set of fields in a repeat region. All the fields are properly displayed when I switch to LiveView or browser preview. I am, however, having the following problem with server behaviors:

If I add “Display Total Records” at the bottom, it displays just fine, but if I try to add the behaviors for previous page, next page, starting record number or ending record number, I get this:

Parse error: syntax error, unexpected ';' in C:\XAMPP\htdocs\LEAP\admin.php on line 81

Lines 81-84  read:

$totalPages_VolApp = ceil($totalRows_VolApp/$maxRows_VolApp = 10;

$pageNum_VolApp = 0;

if (isset($_GET['pageNum_VolApp'])) {

  $pageNum_VolApp = $_GET['pageNum_VolApp'];

I also cannot switch the repeat region to “show all records.” This results in a similar syntax error.

What is a parse error? What problem is indicated? thanks.

This topic has been closed for replies.
Correct answer David_Powers

What is a parse error? What problem is indicated? thanks.

It's an error in code. The error is in the following line:

$totalPages_VolApp = ceil($totalRows_VolApp/$maxRows_VolApp = 10;

That line is nonsense in PHP terms. It has almost certainly been created as a result of not removing server behavior code correctly when making changes to a page. You can't edit PHP code simply by selecting dynamic text in Design view and deleting it. To remove a server behavior cleanly, you need to select its name in the Server Behaviors panel and click the minus button.

The code you have posted here looks so badly corrupted, I suggest you start the page again.

1 reply

David_Powers
David_PowersCorrect answer
Inspiring
September 5, 2009

What is a parse error? What problem is indicated? thanks.

It's an error in code. The error is in the following line:

$totalPages_VolApp = ceil($totalRows_VolApp/$maxRows_VolApp = 10;

That line is nonsense in PHP terms. It has almost certainly been created as a result of not removing server behavior code correctly when making changes to a page. You can't edit PHP code simply by selecting dynamic text in Design view and deleting it. To remove a server behavior cleanly, you need to select its name in the Server Behaviors panel and click the minus button.

The code you have posted here looks so badly corrupted, I suggest you start the page again.