Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

parse errors from server behaviors

Guest
Sep 04, 2009 Sep 04, 2009

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.

TOPICS
Server side applications
497
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 04, 2009 Sep 04, 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

...
Translate
LEGEND ,
Sep 04, 2009 Sep 04, 2009
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines