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
How to get exact 3 moths post date from today date using javascript
How to get exact 3 moths post date from today date using javascript
Please help
Form errors in an array
I'm processing a form and putting the errors in an array. empty($errors) doesn't seem to do the tric
Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).
I keep getting the
Parse String
I need to parse the string below into three variables. How would I do that?
john + 10/20/2008
Javascript or not?
How many people prefer javascript/ajax sites? How many prefer the good old fashion straight php sit
how to get sn motherboard
Hello.
I want to get serial number motherboard, cpu and else hardware.
Can You show me sam
While Problem
i am having a problem with a while statement here is the code
Code: [Select]<?php
sess
ALV sum various columns problem
Hi all,
I'm doing a report on ABAP for a timesheet of the current month. The output i want is s
Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?
This is what I've come up w
elseif help!
OK so I'm new to the site, as well as PHP altogether (Trying my hand at managing an online RPG) and