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
UDS 4.0 Datatype issue
UDS 4.0.322 -- connecting to NI Labview 9.0
When using connection method: Cache with live
Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a
help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when
Multiple server callbacks (NOT POSTBACKS)
Hello,
I have 2 different javascript client side functions that are on timers. When the timers elap
How to ... (FAQs)
... get e-mail notifications
As several people asked how to get e-mail notifications when new posti
Need help making a script that moves data into acrhive table
Hi,
I'm kinda new to php/mysql
And i wrote a simple script to store sales lead for a b
Help, Base64 encoding url and decoding server side.
Hello everyone, i have a website with videos and games and also provide an embed code which people c
PHP Directory Listing Not working
Hey Guys,
I need help, I tried a ton of directory listing scripts and they all don't work. Al
header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1
help finding hacking loopholes
i was attacked by a redirect php injection
my pc is clean of viruses
so i figure that