close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


MySQLi Update Record with parameter in the goto throws a Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)

Thread began 7/22/2016 2:03 pm by Ramiro | Last modified 7/25/2016 9:52 am by Ray Borduin | 1408 views | 1 replies |


MySQLi Update Record with parameter in the goto throws a Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)

Hello there:

When I try to load the update record form page in order to enter the data to update, I'm getting the following parse error on the $UpdateGoTo line:

Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\wamp\www\prueba_update.php on line 18

I'm almost sure the issue is related to the way the behavior constructs the goto url string, since this only happens when I'm passing a parameter on the "After updating, goto:" popup window that is built by Dreamweaver CS6 parameter button generator.

I tried avoiding to pass any parameters in the goto and adding it by hand after the behavior generated the update code and of course it works, but (I assume) because of the handcoding, the server behaviors panel stops showing the update behavior after I altered the original code.

Update Note: Same thing is happening with de MySQLi Insert Record behaviors.

This is the page code:

<?php require_once('Connections/conn.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php require_once('webassist/mysqli/queryobj.php'); ?>
$rsGrupo = new WA_MySQLi_RS("rsGrupo",$conn,1);
$rsGrupo->setQuery("SELECT * FROM modulos_sistema_grupos WHERE id_modulo_sistema_grupo = ?");
$rsGrupo->bindParam("i", "".(isset($_GET['grupo'])?$_GET['grupo']:"") ."", "-1"); //colname
$UpdateQuery = new WA_MySQLi_Query($conn);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "modulos_sistema_grupos";
$UpdateQuery->bindColumn("orden", "i", "".((isset($_POST["orden"]))?$_POST["orden"]:"") ."", "WA_DEFAULT");
$UpdateQuery->addFilter("id_modulo_sistema_grupo", "=", "i", "".((isset($_POST["grupo"]))?$_POST["grupo"]:"") ."");
$UpdateGoTo = "sistema_grupos.php?modulo=\" . echo((isset($_POST[\"modulo\"]))?$_POST[\"modulo\"]:\"\") . \"";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
<!doctype html>
<meta charset="utf-8">
<title>Documento sin título</title>

<form name="form1" method="post" action="">
<td><input name="orden" type="text" id="orden" value="<?php echo($rsGrupo->getColumnVal("orden")); ?>"></td>
<td><input name="modulo" type="text" id="modulo" value="<?php echo $_GET['modulo']; ?>">
<input name="grupo" type="text" id="grupo" value="<?php echo $_GET['grupo']; ?>"></td>
<td><input type="submit" name="button" id="button" value="Enviar"></td>


Sign in to reply to this post

Ray BorduinWebAssist

It looks like the go to page code got improperly encoded. It should be:

$UpdateGoTo = "sistema_grupos.php?modulo=" . echo((isset($_POST["modulo"]))?$_POST["modulo"]:"") . "";

Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...