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'>
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
Execure stored procedure on a timer
Can someone tell me an easier way to execute a stored procedure on a timer? I am using Oracle 10g R
foreach help.
Hello all,
First time I'm attempting to use a foreach statement and was just wondering if my
mysql select query problem
how can i select multiple fields from multiple table in one query like
i have table name t1 a
Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple
Issues: PHP Forms -Clearing
I've tried looking online before actually asking for help, but I've been looking for about the past
what are '%S%', '%E%'
for example when i see Code: [Select]printf("Hello %srn", $name);
what does %s means
small inaccuracies
I have this code to convert fractional base 10 into base 2:
while($num > 0)
Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line
Table colours fail when extra row added
Hey Gurus,
I got a weird problem with formating the colour of a table made in php. Everything
Php - mysql select?
hi, i have this code:
Code: <?php
session_start();
// dBase file
include &quo