We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Simple PHP Page | Forum

Derek
Derek Nov 22 '12
Hi all,


I've been reading some of the other posts on the forum but am still not clear on how to integrate a simple PHP script I had working on my site prior to using Oxwall. It contains some PHP on the top of the page then a little bit in the body too. From reading other posts, it's clear I must make a separate PHP file and then a separate content file. 


This is a simple script that adds an exercise time to the DB. Any pointing in the right direction (even to another similar question) would be greatly appreciated. I want the page to be listed as a menu on the top of the page (next to groups etc). 


Thanks, 


D


<?php
@session_start();
// Connecting to the databaserequire_once('../config.php');// Checking if the Submit button is pressedif ( isset($_POST["Clicked"]) ){// Getting the values securely$Details = strip_tags(mysql_real_escape_string($_POST["textarea"]));
if ( isset($_SESSION["uid"]) ){$User_ID = $_SESSION["uid"];mysql_query("INSERT INTO journal_table (uid,entry_text) VALUES ('$User_ID','$Details') ");?><script type = "text/javascript">alert('Journal Added!');window.location = "http://www.clearthemirror.com/www/index.php";</script><?php}else{mysql_query("INSERT INTO journal_table (uid,entry_text) VALUES ('GUEST','$Details') ");?><script type = "text/javascript">alert('Journal Added!');window.location = "http://www.clearthemirror.com/www/index.php";</script><?php}}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head>
<body><p><?phpif ( isset($_SESSION["uid"]) ){echo "Welcome < " . $_SESSION["uid"] . " >" . " -- " . date('F j, Y') .  "<br><br>";}else{?>Welcome Guest! <br><br><?php}?></p><p>Log Your Meditation </p><form id="form1" name="form1" method="post" action = "http://www.clearmirror.com/journal/new_entry.php">  Journal Entry  <textarea name="textarea" cols="80" rows="8" style = "background-image: url('http://clearmirror.com/www/back.jpg');"></textarea>  <br />  <br />  </label>  <p>    <label>    <input type="submit" name="Clicked" value="Log Now" />    </label>  </p></form><p>&nbsp; </p></body></html>


Paul
Paul Nov 22 '12
One way to do this might be to add an item to the menu via the admin panel and then run the script from a file in an i-frame in the page.  That's what I do when I need to execute PHP scripts that are not part of the program - I'm not a programmer and I'm not too bright, so I use the most simple work-around that I can!


Anyhow, I hope this helps.

Michael I.
Michael I. Dec 7 '12
The best option is to create a simple plugin that will be executing any third-party PHP script.
bilalsonija
bilalsonija Feb 7

Thanks for this web site post and discussing your own results together with us. Very well performed! I think a lot of people find it difficult to understand paying attention to several controversial things associated with this topic, but your own results talk for themselves. I think a number of additional takeaways are the importance of following each of the suggestions you presented in this article and being prepared to be ultra distinct about which one could really work for you greatest. Nice job. tải app bk8

bilalsonija
bilalsonija Feb 7
I and also my buddies were found to be reviewing the excellent tips and tricks on your site and so suddenly I got an awful suspicion I never expressed respect to the web site owner for those tips. All the young boys were as a consequence excited to study all of them and have absolutely been taking advantage of them. We appreciate you getting so helpful and then for figuring out these kinds of ideal subject matter millions of individuals are really eager to discover. Our own sincere apologies for not saying thanks to you sooner. freistehend swimmingpool
SEO HOME PAGE SERVICE
Hello! I merely would choose to offer a large thumbs up to the great information you could have here on this post. I am coming back to your website to get more detailed soon. tải app Miso88
bilalsonija
bilalsonija Feb 13
Wow! This can be one particular of the most beneficial blogs We have ever arrive across on this subject. Basically Magnificent. I’m also a specialist in this topic so I can understand your effort. riches777pg
bilalsonija
bilalsonija Feb 15
Wow! This can be one particular of the most beneficial blogs We have ever arrive across on this subject. Basically Magnificent. I’m also a specialist in this topic so I can understand your effort. acim
SEO HOME PAGE SERVICE
Wow! This could be one particular of the most useful blogs We have ever arrive across on this subject. Basically Great. I’m also an expert in this topic so I can understand your effort. what is a course in miracles
bilalsonija
bilalsonija Feb 15
Wow! This can be one particular of the most beneficial blogs We have ever arrive across on this subject. Basically Magnificent. I’m also a specialist in this topic so I can understand your effort. a course in miracles
SEO HOME PAGE SERVICE
This is the reason it really is greater you could important examination before creating. It will be possible to create better write-up like this. acim
bilalsonija
bilalsonija Feb 19
I’ve really noticed that repairing credit activity needs to be conducted with tactics. If not, you will probably find yourself destroying your standing. In order to succeed in fixing your credit score you have to ensure that from this second you pay all of your monthly dues promptly in advance of their slated date. It’s really significant given that by definitely not accomplishing this, all other activities that you will choose to use to improve your credit rank will not be useful. Thanks for sharing your strategies. bokep xnxx
SEO HOME PAGE SERVICE
Some truly wonderful work on behalf of the owner of this internet site , perfectly great articles . Sugar Defender
SEO HOME PAGE SERVICE
Snap shots entirely on your web blog although building desire immediately a pinch of amount of money submits. Fully satisfying way of permanent long run, Soon we will be book-marking in the period develop into a person's work surface accomplish takes place inches right up inches. jepangqq
SEO HOME PAGE SERVICE
Désormais, 1xbet RDC fait office de référence dans ce pays habitué aux plateformes qui opéraient et continuent d’opérer en toute illégalité. Dans un pays qui compte presque 90 millions d’habitants et dont une bonne majorité est férue de football et de paris sportifs, la disponibilité d’un bookmaker légal et de cette qualité est très avantageuse, à la fois pour les Congolais et 1xbet. code promo 1xbet 2024
bilalsonija
bilalsonija Mar 1
What would many of us do devoid of the brilliant suggestions you share on this web site? Who else has got the perseverance to cope with important topics in the interest of ordinary subscribers like me? My spouse and i and my guys are really lucky to have your website among the ones we typically visit. We hope you know how a great deal we take pleasure in your efforts! Much luck coming from us all. 69vn
SEO HOME PAGE SERVICE
I enjoy every one of the content, I must say i appreciated, I would really like more details concerning this, due to the fact it is extremely great., Thank you regarding revealing. comedone extractor.
SEO HOME PAGE SERVICE
Photographs found on your web site regardless of whether generating fascination speedily a bit of volume submits. Pleasing way of long lasting potential, I shall be book-marking back then turn into your current floor conclude comes up " way up ". pressure washing in dundee
SEO HOME PAGE SERVICE
Instantly this web site will undoubtedly frequently end up being notable regarding all weblog consumers, simply because painstaking reviews as well as checks. 79sodo
SEO HOME PAGE SERVICE
That'sthe cause marketing that you simply appropriate research prior to creating. It's also feasible to put in writing enhanced publishing with this particular. 로즈카지노
Pages: 1 2 3 »