By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

Newbee question

P: n/a
I am trying to clean up my code. I have run it through tidy and now have
the code below. The problem is that anytime I select a radio button I
get the following error:

Forbidden
You don't have permission to access /quotes/'.$_SERVER['PHP_SELF'].'>
<table style= on this server.
--------------------------------------------------------------------------------

Apache/2.0.59 (Win32) mod_jk/1.2.15 SVN/1.4.0 PHP/5.2.0 DAV/2 Server at
localhost Port 80

I am running it locally on my machine under my apache server. What am I
missing?
<Cleaned up code>
<?php
require_once 'includes/config.inc.php';
require_once 'includes/header.inc.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator"
content="HTML Tidy for Linux/x86 (vers 1st November 2002), see
www.w3.org" />
<link href="quotesCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function setCheckedValue(newValue) {
var len = document.author_abbrv.abbr_letter.length
for(var i = 0; i
<len;i++){document.author_abbrv.abbr_letter[i].checked=false;if(document.author_abbrv.abbr_lette r[i].value==newValue.toString()){document.author_abbrv .abbr_letter[i].checked=true;}}}
</script>
<title></title>
</head>
<body>
<form name="author_abbrv" method="post"
action="'.$_SERVER['PHP_SELF'].'%3E%20%3Ctable%20style="
text-align:="" width:=""
summary="This table gives user ability to select authors by
first letter of last name.">
<table>
<tbody>
<tr>
<td><input type="radio" name="abbr_letter"
value="A"
checked="true" onclick="submit()" /A</td>
<td><input type="radio" name="abbr_letter"
value="B"
onclick="submit()" /B</td>
<td><input type="radio" name="abbr_letter"
value="C"
onclick="submit()" /C</td>
<td><input type="radio" name="abbr_letter"
value="D"
onclick="submit()" /D</td>
<td><input type="radio" name="abbr_letter"
value="E"
onclick="submit()" /E</td>
<td><input type="radio" name="abbr_letter"
value="F"
onclick="submit()" /F</td>
<td><input type="radio" name="abbr_letter"
value="G"
onclick="submit()" /G</td>
<td><input type="radio" name="abbr_letter"
value="H"
onclick="submit()" /H</td>
<td><input type="radio" name="abbr_letter"
value="I"
onclick="submit()" /I</td>
<td><input type="radio" name="abbr_letter"
value="J"
onclick="submit()" /J</td>
<td><input type="radio" name="abbr_letter"
value="K"
onclick="submit()" /K</td>
<td><input type="radio" name="abbr_letter"
value="L"
onclick="submit()" /L</td>
<td><input type="radio" name="abbr_letter"
value="M"
onclick="submit()" /M</td>
</tr>
<tr>
<td><input type="radio" name="abbr_letter"
value="N"
onclick="submit()" /N</td>
<td><input type="radio" name="abbr_letter"
value="O"
onclick="submit()" /O</td>
<td><input type="radio" name="abbr_letter"
value="P"
onclick="submit()" /P</td>
<td><input type="radio" name="abbr_letter"
value="Q"
onclick="submit()" /Q</td>
<td><input type="radio" name="abbr_letter"
value="R"
onclick="submit()" /R</td>
<td><input type="radio" name="abbr_letter"
value="S"
onclick="submit()" /S</td>
<td><input type="radio" name="abbr_letter"
value="T"
onclick="submit()" /T</td>
<td><input type="radio" name="abbr_letter"
value="U"
onclick="submit()" /U</td>
<td><input type="radio" name="abbr_letter"
value="V"
onclick="submit()" /V</td>
<td><input type="radio" name="abbr_letter"
value="W"
onclick="submit()" /W</td>
<td><input type="radio" name="abbr_letter"
value="X"
onclick="submit()" /X</td>
<td><input type="radio" name="abbr_letter"
value="Y"
onclick="submit()" /Y</td>
<td><input type="radio" name="abbr_letter"
value="Z"
onclick="submit()" /Z</td>
</tr>
</tbody>
</table>
<br />
<br />
</form>
<select name="author_pk" size="20" cols="10" onclick="submit()">
</select>
</body>
</html>
<Cleaned up code>

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
__________________________________________________ ____________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Nov 19 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
IchBin said the following on 11/19/2006 5:49 PM:
I am trying to clean up my code. I have run it through tidy and now have
the code below. The problem is that anytime I select a radio button I
get the following error:

Forbidden
You don't have permission to access /quotes/'.$_SERVER['PHP_SELF'].'>
<table style= on this server.
I am running it locally on my machine under my apache server. What am I
missing?
<snip>
<form name="author_abbrv" method="post"
action="'.$_SERVER['PHP_SELF'].'%3E%20%3Ctable%20style="
text-align:="" width:=""
summary="This table gives user ability to select authors by
first letter of last name.">
You are missing a closing quote on your action. Look at the action
attribute and what it points at.

action="'.$_SERVER['PHP_SELF'].'" style="

Should fix your non-JS problem :)

You are also going to have problems with your styles.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Nov 19 '06 #2

P: n/a
VK

IchBin wrote:
I am trying to clean up my code. I have run it through tidy and now have
the code below. The problem is that anytime I select a radio button I
get the following error:
Forbidden
You don't have permission to access /quotes/'.$_SERVER['PHP_SELF'].'>
<table style= on this server.
That's an absolutely amazing positive progress in your HTML layout. By
making some critics in the previous thread I did not expect you will
take it so seriously.

As Mr.Webb pointed out you problem is in calling your PHP, not in
JavaScript. Did your solution start to work by now?

Nov 20 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.