Echoing If Function?
Posted on
16th Feb 2014 07:03 pm by
admin
A script I am using has If statements in the comments form to basically tell the form what to do. Currently the form works by opening in a pop up for those who want to read/write comments. I'm changing it so that the form displays on the same page, essentially removing the need for a pop up. I have,
Code: if ($_GET['comment']) {
echo "<SCRIPT LANGUAGE='JavaScript'>
Did you know?Explore Trending and Topic pages for more stories like this.
function smiles(which) {
document.form1.text1.value = document.form1.text1.value + which;
}
</SCRIPT>
<form name='form1' method='post' action='comments.php?load=comments&view=add'>
<input type='hidden' name='aid' value='".$_GET['aid']."'>
<input type='hidden' name='name' value='".$_COOKIE[$pre."username"]."'>
<table cellspacing="0" cellpadding="1" border="0" align="center">
<tr><td><b>Name</b></td><td>".$_COOKIE[$pre."username"]."</td></tr>
As a snippet of some of the code. I want to know how I can make the If statement form appear on the page without removing,
Code: if ($_GET['comment']) {
As it would break the script since 'comment' is needed for the form to proceed without errors. I've tried variations of echo on $_GET['comment'] but it didn't do anything.
Hope that made sense, any ideas?
No comments posted yet
Your Answer:
Login to answer
173
13
Other forums
classic dynpro : hide area and auto adjust hights
Hi,
I want to develop a similar user interface as is used in standard transaction MIGO.
Do While statement
hi guys,
This may sound trivial but im new to php and as part of an assignmenti have to const
Material xxx does not exist in plant xxx
Dear All,
I am working for a steel project which is repetitive manufacturing.
highlighting search terms
well, I started this in the regular PHP section, but it no longer fits there. Suffice it to say, I'm
DataTable Help Required
Hi all I am creating an app that utilises and MS Access back end and queries it quite a bit at vario
Simple Scraper... Weird Output
Okay, maybe I just need a Blue Monster and some sleep, but....
I'm scraping a ringtone site
Loops and Classes
I am making a template system and everything seems to be going well up until I have to loop in a var
session variable problem
Session variable is not working in Fire fox i am getting null value but it is working fine in IE.
Simple AND question
Hello,
I've got following code:
Code: if(strpos($row[13],"http://")
browse folder only
hi,
is there a way i can browse or get the directory or folder only and not the file?
i just w