close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

POST values of dates not being transferred on new mysql_i page

Thread begun 7/20/2019 8:56 am by Sweens | Last modified 10/14/2020 12:14 pm by Ray Borduin | 2572 views | 29 replies |

Sweens

POST values of dates not being transferred on new mysql_i page

Hi Ray

I've converted to mysql_i a page (1-add-several4.php) that allows several meetings to be generated. The data should then be post values on the next page - 1-add-several-insert.php page, but the values of the StartDate are not being transferred/generated.

My original pages, using mysql, work fine.

Is there something obvious?

When I click on the recordset in the bindings panel, I get the following error

MySQLi Error#: 1054

Unknown column 'p1' in 'field list'

Hope you can help.
Cheers
Chris

Sign in to reply to this post

Ray BorduinWebAssist

Some of your form elements have "readonly"... they won't be included in the form POST if they are marked as readonly. The easiest solution is to add hidden form elements with those same values as well and use those posted values on the second page.

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

Sweens

Thanks Ray

The current page, using bootstrap 3, works fine with the readonly fields. I've tried removing the readonly attributes on the new pages - and the dates still aren't carried across.

Cheers
Chris

Sign in to reply to this post

Ray BorduinWebAssist

Add this to the top of 1-add-several-insert4.php:

<?php
var_dump($_POST);
die();
?>

That will tell you if the form elements are properly posted to that page. Let me know what you find out. I don't see why the form elements wouldn't exist. Maybe it is something else.

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

Sweens

Hi Ray

Sorry for the delay in replying.

The following is displayed when I add that code to the page:

array(10) { ["PgTitle"]=> string(12) "test meeting" ["BrDetails"]=> string(12) "jhg jhg jhg " ["MOinf"]=> string(0) "" ["rep1"]=> string(1) "1" ["StartDate"]=> string(16) "2019-10-07 19:30" ["HidStart"]=> string(16) "2019-10-07 19:30" ["MeetDuration"]=> string(8) "01:30:00" ["numbermeets"]=> string(1) "3" ["pt"]=> string(0) "" ["btnAddsev"]=> string(0) "" }

This is the same sort of result I get if I add the code to the current, mysql, page.

Cheers
Chris

Sign in to reply to this post

Ray BorduinWebAssist

The value of StartDate seems to be transferred to the page. So the issue has to be with the insert into the database. Is that where you found the problem? The value of that field is wrong? What value is inserted into the database?

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

Sweens

Hi Ray

No, it's before it gets that far - the dates aren't displayed in the form field when the page loads.

Cheers
Chris

Sign in to reply to this post

Ray BorduinWebAssist

If you want them populated from the post on the previous page, then you should use the posted form element values to set the values in the fields. It looks like they are set to recordset values currently.

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

Sweens

The recordset calculates the start and end dates of several meetings, based on the POST values from the form. I think that's where the problem lies - the mysql version calculates things properly and it looks like the mysql_i version doesn't; the old page inserts the incremented dates from the recordset.

Cheers
Chris

Sign in to reply to this post

Ray BorduinWebAssist

Then the problem is in the recordset not returning the data to populate the form element. Use this to see what SQL statement is being used:

<?php
echo($rsMeets->debugSQL());
?>

Then take that query and run it in PHPmyAdmin to see why it isn't returning the correct date values. Then you might be able to spot the problem or give me more information so that I can help.

Sign in to reply to this post
Did this help? Tips are appreciated...
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...