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
Shuffle between users ??
I have multiple $users in table. I need to send them $message.
I need to send the next messag
Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rew
an interesting question
Greetings folks, got to ask an interesting question...
let say
i have created a function s
Request.UrlReferrer
I need to make it so that a page can only be loaded when a button is clicked on a specific page. I d
Help with syntax
Hi all!
The $bridge variable is not getting passed while it is contained in the line below:
FILTER_CALLBACK -- Files?
Hi All,
I'm using the php filter functions to validate my form data. For custom filters, I'm
PHP FTP connect doesn't work with correct login
Hi!
i am working on this test code:
Quote<?php
$ftp_ser
Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get
empty() error
Why does
Code: empty($USER_ID = $_SESSION["USER_ID"])
create this error...
Help with some dates
I have a list of dates in an array:
$mondays = array(
strtotime("October 12, 2009