close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQLi update

Thread began 1/19/2015 1:49 pm by Poj | Last modified 1/20/2015 1:30 pm by Jason Byrnes | 1161 views | 9 replies |

Poj

MySQLi update

I corrects and updates the results with MySQLi.
When I press the update button, I want to come to a verification page to verify that it is correct.
What should I do?
I want to use this variable <? Php echo ($ Recordset1-> getColumnVal ("match_id")); ?>

Sign in to reply to this post

Jason ByrnesWebAssist

pass that variable in a hidden form element, and use the hidden form element to return it.

Sign in to reply to this post

Poj

How exactly do I do this? "and use the hidden form element to return it."
<input name="hiddenField2" type="hidden" id="hiddenField2" value="<?php echo($Recordset1->getColumnVal("match_id")); ?>" />

Sign in to reply to this post

Jason ByrnesWebAssist

so the name of the form element is hiddenField2:

name="hiddenField2"


the code to return that value would be:

<?php echo(isset($_POST['hiddenField2'])?$_POST['hiddenField2']:""); ?>

assuming the form uses the post method, if it uses the GET method, change POST to GET

Sign in to reply to this post

Poj

It does not work, I miss anything. What will it say on the Column Bindings tab?

Code/
<?php
if (isset($_POST["skicka"]) || isset($_POST["skicka_x"])) {
$UpdateQuery = new WA_MySQLi_Query($teamet_i);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "team_resultat";
$UpdateQuery->bindColumn("serie1", "i", "".((isset($_POST["serie1"]))?$_POST["serie1"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("serie2", "i", "".((isset($_POST["serie2"]))?$_POST["serie2"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("serie3", "i", "".((isset($_POST["serie3"]))?$_POST["serie3"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("serie4", "i", "".((isset($_POST["serie4"]))?$_POST["serie4"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("resultat", "i", "".((isset($_POST["resultat"]))?$_POST["resultat"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("serier", "i", "".((isset($_POST["serier"]))?$_POST["serier"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("banp", "i", "".((isset($_POST["banp"]))?$_POST["banp"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("match_id", "i", "".((isset($_POST["hiddenField2"]))?$_POST["hiddenField2"]:"") ."", "WA_DEFAULT");
$UpdateQuery->addFilter("id", "=", "i", "".((isset($_POST["hiddenField"]))?$_POST["hiddenField"]:"") ."");
$UpdateQuery->execute();
$UpdateGoTo = "kontroll_i.php";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of the page.

Sign in to reply to this post

Poj

See private message

Sign in to reply to this post

Jason ByrnesWebAssist

the code looks correct


I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Poj

The page is not online yet. only in my webserver at home.
I enclose check page where I want to see match_id along the bottom.

Sign in to reply to this post

Jason ByrnesWebAssist

The post won't be available to that page, the POST is only available to the page that the form posts to.

you will need to use the recordset to lookup the match id value.

Sign in to reply to this post
loading

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

Content

rating

Layout

rating

Ease of use

rating

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...