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
Ball movement
I want to move a ball from one point to another and it should hit a group of balls at the other end
jquery validation in codeIgniter
hai i need to add client side validation to my fiels which are selected in a forloop.the fields are
PHP and Javascript
Hello Everyone,
I have a page that needs a javascript code to be written between PHP code but
php + mysql count consecutive data
I have a database of values and I want to work out how to display them if the values match a consecu
Simple email form - Newbie
Hello all,
First time poster!
I've been asked to create a simple HTML form that submit
Ten Operator Syntax
Hi Guys,
I can't figure out why i am getting a parse error with this basic ten op code:
fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and
Problem with a select distinct
I have a problema with a select distinct, I have the next sql:
select distinct a,b,c,d fr
output_buffering so rewrite
I'm planning to rewrite some of my scripts so they don't have to use output buffering to accomplish
IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other