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
multiple recipients + dbuser mail recall
Hello,
I am building a php login script.
When the user registers the script will send
paginate search result
Hi, I have a paginations script to display data from my database but i would like to paginate someon
dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one
I display mysql results in a table
foreach and array need help combining
Hi guys.
Here's the code
Code: array(
'tag' => 'code',<
Error when call dll from oracle
Hi all, please help me!
I have dll write C language, I want call it from oracle procedur
Why does my crawler script suddenly end with no error?
Hi.
I have written a web crawler script. It will visit a large number of URL's with cURL.
Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi
contact form - output to page and email
I have the following in my controller:
$message['name'] = htmlentities(strip_tags(trim($_POST
RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mai
Linking with Foreign Keys
I have been getting an erro when I try and link:
create table Faculty_Specialty (I_Name v