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
Bandwidth monitoring?
Hi guys,
I need a little information I have written a php app and I occurred to that I need
FFmpeg Images 2 Video conversion problem ??
I got folder full of images , number of images = 600 , I want to make a video which plays one image
very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and
Login logout link help
Hi all,
Im new to php and Im having trouble creating a login/logout link for my page that dis
Changing color in GD via variable?
Hey guys, I'm new here. x)
I'm very much a noob when it comes to PHP, but I'm trying to learn
Checking if field is empty AND using !is_numeric
Hi lads,
Need to be able to display an error message (using isset?) that says "Cant lea
Standard DES encryption script?
Can anybody point me to a tutorial or a short script that shows how to encrypt some text with salt i
Setting condidtions for an input box
Hi all,
I would like to set a condition in a txt box that says the number a user enters has t
Batch Related Pricing
Hi, I need some clarity on the batch related pricing
For example the following are the b
List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab