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
drop-down with sub-category appear
Hello,
i know how to build a simple dro-down list, im looking for a code when im gonna choose
I need some help with the IF command...
I have a large number of images in one section of my website with the .jpg format. I'm adding a bun
$action = "insert"; //$action = $_GET['action'];
$action = "insert";
//$action = $_GET['action'];
why is this invalid type? I am
Day of week
I am using PHP version 5.0.5
I have a varaible ($DATE (date format yyyy-mm-dd)) that is being inc
same querie, or a new one??
Hi guys,
I'm still working on this drop down list. I've got the actual drop down list to wor
DB2 for z/OS, LUW, iSeries
Hello,
In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS
If a form submits back to same page do you need to use $get
IM trying to pass page number and year that was selected back to the same page.
i have this c
Display error above the login forum help!
Hi guys. just so you know im not asking for someone to do this for me I just need to be pointed in t
Transform value 0 in no and 1 in yes help needed
Hello,
I have this in the table: "value" type int 0 to represent false and 1 to represe
Option box to change variable
Hello, i need help by making a script!
I need to write a file with option box, so a dropdown