Welcome, Guest. Please login or register.
Did you miss your activation email?
February 13, 2012, 03:46:36 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149700 Posts in 21103 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Migrating PHP/MySQL Application to Website Baker  (Read 1370 times)
hancman

Offline Offline

Posts: 40


« on: October 16, 2010, 06:30:28 PM »

Hi there,
I am about to migrate an PHP/MYSQL application to website baker and need just a little advice.

The php pages are all structured as follows:

Block 1
[
PHP CODE processing form submits
]
Block 2
[
MIXED HTML/PHP/JAVASCRIPT

e.g., HTML/PHP -
<textarea name="SessionNotes" cols="40" rows="6">
<?php echo htmlentities($row_rsCaseManagementSession['SessionNotes'], ENT_COMPAT, 'utf-8'); ?>
</textarea>

e.g., HTML/JAVA SCRIPT/PHP
<td>
      <script>
      DateInput('SessionDate', true, 'YYYY-MM-DD','<?php echo      htmlentities($row_rsCaseManagementSession['SessionDate'], ENT_COMPAT, 'utf-8'); ?>')
      </script>
</td>

]
[
PHP CODE releasing database resources e.g. mysql_free_result statements;
]
the form action parameter uses "<?php echo $editFormAction; ?>" to use Block 1 to process the form submission.

I suppose Block 1 could simply be put in an independent php file and use the action parameter to access it.
Is that a say assumption?

Block 2 is where i really get lost. Since the PHP code is used to dynamically populate form fields and the other code address form formatting and behavior, i am wondering is there any straight forward way of dealing with the code as a group vs. having to develop individual snippets for each piece of PHP needed?

Any suggestions would be greatly appreciated.

Thanks,
Mike...
Logged
edsontkasai

Offline Offline

Posts: 1


« Reply #1 on: January 15, 2011, 05:39:55 PM »

hey, whats up...

please help-me!

I wanna get some datas of the mysql, and make one list with somethings datas,
but I dont use modules for this case, I used the module MPform for create the table of datas,
now I want get the datas createds from MPform and use on the new other page creating my list,

att,
Logged
pcwacht
AddOn Development
*
Offline Offline

Posts: 2814



WWW
« Reply #2 on: January 15, 2011, 05:50:49 PM »

if your php code etc works

try code section, in it paste your code
Make sure not to use the php tags
html etc should be echoed

Other option
make a module, your code should go to view.php

Good luck,
John
Logged

http://www.ictwacht.nl = Dutch ICT info
http://www.pcwacht.nl = My first
both still work in progress, since years.....
NorHei
Forum administrator
*****
Offline Offline

Posts: 466


WWW
« Reply #3 on: January 15, 2011, 10:38:00 PM »

I would use code2 for a fist try, as it has PHP, HTML and JS blocks available.

Another idea would be to use a wrapper.
Logged

It is easier to change the specification to fit the program than vice versa.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!