# Placing PHP code in specific locations in RW

**URL:** <https://forums.realmacsoftware.com/t/placing-php-code-in-specific-locations-in-rw/7693>\
**Category:** RapidWeaver Classic\
**Created:** [June 8, 2016, 4:24pm UTC](https://forums.realmacsoftware.com/t/placing-php-code-in-specific-locations-in-rw/7693 "2016-06-08T16:24:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beemerang](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Beemerang](https://forums.realmacsoftware.com/u/Beemerang)\
**Post date:** [June 8, 2016, 4:24pm UTC](https://forums.realmacsoftware.com/t/placing-php-code-in-specific-locations-in-rw/7693/1 "2016-06-08T16:24:25Z")

</div>

Hello guys,

I’m installing a script from PHPJabbers and this one requires some PHP code to be placed on the page in specific locations (first line and last line of code on the page). I’m trying to figure out how to do this and I’m not certain that using the code fields in RW HUD would work.

I’m assuming that I can place the first line of code by placing it in the Prefix field but what about placing the last line of code? EDIT: Actually, placing the code in the BODY field in the RW HUD places it as the last line before the tag. Brilliant!

If I View Source and then paste the code, will this code be saved with the project if I return to normal view and save? EDIT: I’ve realised that one cannot edit the source code sadly. This would be a great feature if Realmac would consider it but I guess it could be dangerous!

Any help appreciated,  
Beem

---

<div class="post-metadata">

**Author:** ![swilliam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/swilliam/32/14799_2.png) [@swilliam](https://forums.realmacsoftware.com/u/swilliam)\
**Post date:** [June 8, 2016, 7:25pm UTC](https://forums.realmacsoftware.com/t/placing-php-code-in-specific-locations-in-rw/7693/2 "2016-06-08T19:25:15Z")

</div>

This has come up before (phpjabber code).  
Nope you cannot edit source then reload it into RW.  
Only option is to export the page, add the code and upload via ftp.  
Put a big note to yourself at the top of the page using locker (or similar stack, you can even put the code to be pasted in there) to remind yourself later.

Not a great solution, but it works

---

<div class="post-metadata">

**Author:** ![Beemerang](https://avatars.discourse-cdn.com/v4/letter/b/d2c977/32.png) [@Beemerang](https://forums.realmacsoftware.com/u/Beemerang)\
**Post date:** [June 8, 2016, 7:48pm UTC](https://forums.realmacsoftware.com/t/placing-php-code-in-specific-locations-in-rw/7693/3 "2016-06-08T19:48:50Z")

</div>

Thanks for the reply @swilliam.
