PHP and RSD ideas

User 306597 Photo


Registered User
33 posts

Hello all. I have been 'hard coding' websites for years. I also used VSD for convenience many times and HTML Editor, along with many of Coffeecup's software tools to make my life easier (faster).

I've been checking out RSD and I am *really* enjoying it. I've learned a lot from taking apart and utilizing one of the themes, rearranging it, making my own, etc. However I have now come across a conundrum. Not really, but I could use some recommendations if anyone has any.

I need to create a member's area for a website. I am used to just creating these kinds of websites using 'webpage.php' websites I've made. It all hooks in for the session variable, login and account pages, posting / retrieving info, etc.

So are there any good tutorials or anyone have ideas on how they would go about 'including' separate PHP code into their completely xxx.html page file based website?

Sorry such a long post. I've been thinking about ways to do this, but to run php code - it needs to be a .php file so far as I know so I think I'm looking at possibly just using RSD to completely design the site and then having to manually cannibalize the site into *.php?

Any thoughts?

Thanks everyone. I'm probably just too old and not keeping up on a much easier way to do a secure MySQL login and user database as well. I'm open to options there as well. Thanks!
User 187934 Photo


Senior Advisor
20,190 posts

Most servers allow you to sparse php inside an html page if you set them up with a little adjustment to the .htaccess file. That's what I did for a site that has a login system.
AddHandler application/x-httpd-php .php .html .htm
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 306597 Photo


Registered User
33 posts

Fantastic idea. Now in reference to RSD, did you just use the HTML element to provide yourself the areas to perform the PHP operations? Like grabbing / checking the SESSION variable, login submission info, etc.

I'm probably making it more complicated than it is, but I know that every time we save and export our website using RSD, any manual changes made are out the window. Just like VSD of course.

Thank you for the input!

User 187934 Photo


Senior Advisor
20,190 posts

Yes you can place your php markup inside your html element.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 450830 Photo


Registered User
148 posts

Most servers allow you to sparse php inside an html page if you set them up with a little adjustment to the .htaccess file. That's what I did for a site that has a login system.
AddHandler application/x-httpd-php .php .html .htm


Yes, this is useful for data such as addresses or menu bars that appear on multiple pages so that you can change it in one place. Only you can see this data is not in your design, therefore it would be easy as there are in RSD would construct a library as in the HTML editor.

Below Netherland text

Ja dit is ook handig voor gegevens zoals adressen of menu balken die op meerdere pagina's voorkomen zodat je deze op één plaats kan wijzigen. Alleen zie je deze gegevens niet in je ontwerp, daarom zou het makkelijk zijn als er in RSD een bibiotheek zou komen zoals in de HTML editor.
groet,

Ger van Veen
http://schilder-vanveen.nl
User 306597 Photo


Registered User
33 posts

Yep this is exactly what I needed guys - and for those that might need this information... GoDaddy's cPanel hosting is a little wonky about handlers so this is what you need to enable html, etc. parsing:

Options +ExecCGI
AddHandler fcgid-script .html
FCGIWrapper /usr/local/cpanel/cgi-sys/php5 .html


Normally - I like shell access or simplified linux hosting, but hey... you work with the hand you're dealt. :)

Thanks very much. I'll contribute a tutorial for the community once I have something worth sharing.


User 10077 Photo


Senior Advisor
1,095 posts

I use PHP with RSD quite a bit, so I have some advice on this topic. Rather than putting the PHP code in the html element, I put all PHP code on its own page using HTML Editor. After saving the page, I just put an include statement in the html element. It's much easier to edit the php code if needed.
ASK ME ANYTHING
I provide personalized help for Coffeecup Users including personal or group training for Site Designer, Web Form Builder and more via Zoom.
Email me at support@uscni.org or call 865-687-7698.

Did you know that Web Form Builder can be used for both simple and complicated forms and that it's not limited to the default fonts and buttons? Take a look at a form we developed for WindowTinting.com.
https://forms.windowtinting.com/forms/w … ppingcart/
User 187934 Photo


Senior Advisor
20,190 posts

Brian Durfee wrote:
I use PHP with RSD quite a bit, so I have some advice on this topic. Rather than putting the PHP code in the html element, I put all PHP code on its own page using HTML Editor. After saving the page, I just put an include statement in the html element. It's much easier to edit the php code if needed.

Last I checked a php include is php code.:P
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 10077 Photo


Senior Advisor
1,095 posts

Lol. That's what I get for posting when I'm in a hurry. <<insert foot in mouth here>> Lol.

To be more clear:
--- Write all your PHP code in a page that you save within your exported web site but separate from your RSD project.
--- Put a single line of php code in the html element that includes the larger, easy-to-edit PHP document that you previously created.

This method has two benefits:
1. Having the code visible in an editor (such as HTML Editor) makes it much easier to write and edit.
2. Because the code is external to the RSD project itself, you don't have to edit in that tiny html element window or re-export your RSD project when you want to make changes to the PHP code. You just edit the included file and upload it to the server.
ASK ME ANYTHING
I provide personalized help for Coffeecup Users including personal or group training for Site Designer, Web Form Builder and more via Zoom.
Email me at support@uscni.org or call 865-687-7698.

Did you know that Web Form Builder can be used for both simple and complicated forms and that it's not limited to the default fonts and buttons? Take a look at a form we developed for WindowTinting.com.
https://forms.windowtinting.com/forms/w … ppingcart/
User 187934 Photo


Senior Advisor
20,190 posts

I'm with you Brian. The site I use the login on is all hand coded but the use of includes is the best approach for repeat of content but if you have a one time thing why not do the alterations within RSD. The only thing I see is that the HTML Element's entry area is to small. It would be nice if that could be expanded.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.