WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Migrating PHP/MySQL Application to Website Baker
  • Print
Pages: [1]   Go Down

Author Topic: Migrating PHP/MySQL Application to Website Baker  (Read 7395 times)

Offline hancman

  • Posts: 43
Migrating PHP/MySQL Application to Website Baker
« on: October 16, 2010, 07: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

  • Guest
Re: Migrating PHP/MySQL Application to Website Baker
« 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

Offline pcwacht

  • Posts: 2923
  • Gender: Male
    • Dutch ICT info
Re: Migrating PHP/MySQL Application to Website Baker
« 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

  • Guest
Re: Migrating PHP/MySQL Application to Website Baker
« 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

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • Migrating PHP/MySQL Application to Website Baker
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2