close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

form display

Thread began 1/13/2022 10:34 am by birdscreen398247 | Last modified 1/13/2022 7:51 pm by Ray Borduin | 180 views | 3 replies |

birdscreen398247

form display

Here is another update query and display problem.

Not only doesn't the update query work, none of the data from the record displays on the form (other than the header data which is another recordset).

When I test the recordset in the wizard, it displays the selected record just fine.

I have gone over and over the fields on the form looking for typos and I can't find any.

What do you see?

Attached Files
PORC_edit_vote_status.php
Sign in to reply to this post

Brant

Your recordset is filtered with: $_GET['ID']

The other recordsets are filtered with: $_GET['record_number']

Are you passing in both of those? Maybe the issue is that the record_number url parameter isn't being passed into the page? Maybe those should be updated to use $_GET['ID']?

Sign in to reply to this post

birdscreen398247

Maybe I need to approach it differently. I need to use to variables to open several related pages. One variable for some another variable for others, but always coming back to the first page.

This code opens the following page and sends the ID to it.

<a href="PORC_edit_submission.php?ID=<?php echo ($rsOneSpecies->getColumnVal("ID")); ?>"><?php echo($rsOneSpecies->getColumnVal("ID")); ?></a>

I want to store that ID to a SESSION Variable named “record_ID”

So on the PORC_edit_submission.php page I put this code.

<?php
if (isset($_GET['ID'])) {
@session_start();
$_SESSION["record_ID"] = $_GET['ID'];
@session_commit();
} else if (isset($_SESSION['record_ID'])) {
$_GET["ID"] = $_SESSION['record_ID'];
}
?>

Is that code correct?


Also ,when that page opens (PORC_edit_submission.php), I want to store the record_number in a SESSION Variable (record_number) so I can use it for opening related pages (Some pages will open using record_ID and other record_number).

I want to get the record_number from this recordset.

<?php
$rsRecords = new WA_MySQLi_RS("rsRecords",$siteguide2018,0);
$rsRecords->setQuery("SELECT * FROM PORC_records, aou_list WHERE ID = ? AND PORC_records.species_number = aou_list.SPNO");
$rsRecords->bindParam("i", "".(isset($_GET['ID'])?$_GET['ID']:"") ."", "-1"); //colname
$rsRecords->execute();
?>

What is the code for that?

Or am I going about this all wrong?

Sign in to reply to this post

Ray BorduinWebAssist

I think that could work. To get a value from a recordset you can use:

$rsRecords->getColumnVal("column_name")

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

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