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
Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t
extract a file from zip file
hi,
i know how to unzip a zip file in php, but is there a way to just extract a certain file only
Problem with umlauts and UTF-8
Hello every1,
I'm creating my own little CMS at the moment and got some problems with the cha
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
Can we convert non uni code system into unicode
Hi All,
Presently i am using non-unicode system and the sap version is 4.7.
Can i c
help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?
I was thinking s
include
Hi I have this way of licensing my PHP application, and I want to know if you guys can answer some q
Local file browser with php
Halo..
So this is what i want to create. I have a folder that i share and it has many movies.
Creating web pages by php
Hello again,
I was just wondering us there a way to use a php script to create a new web page. I
Login logout link help
Hi all,
Im new to php and Im having trouble creating a login/logout link for my page that dis