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
dynamic table with forms
I have a table that is populated with mysql data and in teh first column there is a raido button tha
Just wondering what you think about my site
I am new to phpfreaks i just seen this form and thought it would be cool to see what other thought a
Conditions of info record - Error
When i created GR (901) and PO create automatic my PBXX is obtain the net price of info record but
mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???
this is the code i got
Month String to Numeric?
Hi guys,
Given a month as a string, is there a simple way to find the numeric representation
how do i make a string??
hey guys,
can someone please tell me how to put data from the glob function into a string
Libraries in C++
Hi all,
I have two libraries. one is based targeted on linux platform and uses another li
bind error during socket programming
i am kinda new to socket programming. wrote the below code for a server. but getting the bind error
php title problem
Hi,
I am having a problem managing my page title with PHP.
Currently I have my <
Does deleting the spmlog directory critical?
Hi Everyone,
Please, hope you could help me. We're having problems with the SAP backup. I