PDA

View Full Version : Disappearing dynamic list


nrenfree
03-16-2007, 05:45 PM
I have created a PHP page where the user clicks on a word in a ListBox containing a list of words retrieved from a MySQL database. When the user clicks a word, a picture representing that word appears on another part of the screen.

Clicking the word submits the form the ListBox is a part of and sends a URL variable that is used to get a value from another MySQL table that is used to create the source path to the image.

When the word is clicked, the list of words disappears. I would REALLY like the list to stay visible so the user can click another word if they wish.

Here is the code for the listbox:

<select name="vocabList" size="10" class="style5" id="vocabList" onchange="MM_setTextOfTextfield('vocabWrdChosen','',''+(voca bList[vocabList.selectedIndex].text)+'');document.frmWrdList.submit()">
<?php
do {
?>
<option value="<?php echo $row_wrdList['picID']?>"><?php echo $row_wrdList['vocabWord']?></option>
<?php
} while ($row_wrdList = mysql_fetch_assoc($wrdList));
$rows = mysql_num_rows($wrdList);
if($rows > 0) {
mysql_data_seek($wrdList, 0);
$row_wrdList = mysql_fetch_assoc($wrdList);
}
?>
</select>This must be possible. As someone just learning, I haven't been able to find the answer.

Any suggestions?

Thank you so much for your help,

Nancy

domedia
03-16-2007, 06:01 PM
What you're calling a 'ListBox' is the form element SELECT, commonly referred to as 'menu'. The very nature of this form element is to only stay expanded until you chose an OPTION.

Did you consider using radio buttons instead? They are mutually exclusive, just like form menus, but they have the advantage that they stay visible all the time.

Example:
<INPUT type="radio" name="sex" value="Male"> Male
<INPUT type="radio" name="sex" value="Female"> Female

tux
03-18-2007, 12:00 AM
Hi Nancy,

I'm new to building dynamic websites too but have picked up a few pointers recently. I am building a website for a camera club. On the gallery page I have a jump menu populated with the photographers names. When the user chooses a name it links to a second page and displays the chosen photographers images together with the jump menu so that a new photographer can be chosen. I think you could use the same method for your words. I use ASP so you will have to alter things yourself to PHP.

You need to use some Javascript in the head of your page that references your form. Here is the script.....


<script language="javascript" type="text/javascript">

function submiter(){

id = document.getElementById('vocabList').value;

if(id != '0'){
document.location.href=youroutputpage.php?yourimag eid='+id;
}

}
</script>

....and here is the form

<form id="form1" name="form1" method="post" action="">
<select name="vocabList" onchange="submiter()">
<option value="">choose a word</option>
<option value= YOUR PHP INFO FOR THE JUMP MENU HERE
</select>

</form>

Then on the output page display the image using the imageID from the URL.

Hope this helps Nancy. I'm more ASP so cant help with the PHP bits but if you populate the list as you did before from your database you should be okay. Let me know how you get on.

Regards, Paul

PS: This was shown to me by Davidj so all credit to him.

davidj
03-19-2007, 08:59 AM
paste your code from the page

all of it

westmatrix99
03-19-2007, 10:07 AM
12345678901

davidj
03-19-2007, 10:41 AM
this sounds like your SQL select is not getting resubmitted after the initial submit

your select is initialy running which populates your dropdown menu. When you click an option and press the GO button your select is coming back empty because you are not passing the initial values as yo did when you first arrived at the page

post the code of the page and i will sort it

nrenfree
03-19-2007, 06:16 PM
Here is the code for the entire page...... including the alphabet radio buttons the user clicks on to choose what list of words they'd like to see, the dynamically populated list and the image to show pictures that go along with the chosen word. (The project will be an online dictionary sort of thing.)

Because of the Forum post maximum character limit, I have broken up the code into three chunk.

<?php require_once('Connections/instantVocab.php'); ?>
<?php require_once('Connections/instantVocab.php'); ?>
<?php require_once('Connections/instantVocab.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$currentPage = $_SERVER["PHP_SELF"];

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$colname_wrdList = "-1";
if (isset($_GET['alphabet'])) {
$colname_wrdList = $_GET['alphabet'];
}
mysql_select_db($database_instantVocab, $instantVocab);
$query_wrdList = sprintf("SELECT * FROM wordList WHERE vocabWord LIKE %s ORDER BY vocabWord ASC", GetSQLValueString($colname_wrdList . "%", "text"));
$wrdList = mysql_query($query_wrdList, $instantVocab) or die(mysql_error());
$row_wrdList = mysql_fetch_assoc($wrdList);
$totalRows_wrdList = mysql_num_rows($wrdList);

$maxRows_picIDs = 1;
$pageNum_picIDs = 0;
if (isset($_GET['pageNum_picIDs'])) {
$pageNum_picIDs = $_GET['pageNum_picIDs'];
}
$startRow_picIDs = $pageNum_picIDs * $maxRows_picIDs;

$colname_picIDs = "-1";
if (isset($_GET['vocabList'])) {
$colname_picIDs = $_GET['vocabList'];
}
mysql_select_db($database_instantVocab, $instantVocab);
$query_picIDs = sprintf("SELECT * FROM picReference WHERE picID = %s", GetSQLValueString($colname_picIDs, "text"));
$query_limit_picIDs = sprintf("%s LIMIT %d, %d", $query_picIDs, $startRow_picIDs, $maxRows_picIDs);
$picIDs = mysql_query($query_limit_picIDs, $instantVocab) or die(mysql_error());
$row_picIDs = mysql_fetch_assoc($picIDs);

if (isset($_GET['totalRows_picIDs'])) {
$totalRows_picIDs = $_GET['totalRows_picIDs'];
} else {
$all_picIDs = mysql_query($query_picIDs);
$totalRows_picIDs = mysql_num_rows($all_picIDs);
}
$totalPages_picIDs = ceil($totalRows_picIDs/$maxRows_picIDs)-1;

$colname_vocabWrdChosen = "-1";
if (isset($_GET['wrdList'])) {
$colname_vocabWrdChosen = $_GET['wrdList'];
}
mysql_select_db($database_instantVocab, $instantVocab);
$query_vocabWrdChosen = sprintf("SELECT * FROM wordList WHERE picID = %s", GetSQLValueString($colname_vocabWrdChosen, "text"));
$vocabWrdChosen = mysql_query($query_vocabWrdChosen, $instantVocab) or die(mysql_error());
$row_vocabWrdChosen = mysql_fetch_assoc($vocabWrdChosen);
$totalRows_vocabWrdChosen = mysql_num_rows($vocabWrdChosen);

$queryString_picIDs = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_picIDs") == false &&
stristr($param, "totalRows_picIDs") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_picIDs = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_picIDs = sprintf("&totalRows_picIDs=%d%s", $totalRows_picIDs, $queryString_picIDs);
?><!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 http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Instant Dictionary</title>
<script type="text/JavaScript">
<!--

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function flevSubmitForm() { // v1.1
// Copyright 2002, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
var sF = arguments[0], oF = MM_findObj(sF), sA = (arguments.length > 1) ? arguments[1] : "";
if (oF) {if (sA != "") {oF.action = sA;} oF.submit(); document.MM_returnValue = false;}
}

nrenfree
03-19-2007, 06:17 PM
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
//-->
</script>
<style type="text/css">
<!--
body {
background-image: url(otherPics/wood004.jpg);
background-repeat: repeat;
}
.style4 {font-size: 14pt}
.style5 {font-size: medium}
#TitleLayer {
position:absolute;
width:174px;
height:19px;
z-index:1;
left: 24px;
top: 54px;
background-color: #FFFFFF;
}
-->
</style></head>

<body>
<table width="626" border="0" cellspacing="0" cellpadding="0" summary="Table to hold page sections.">
<tr bordercolor="#6699FF" bgcolor="#66CCFF">
<td height="15" colspan="4">&nbsp;</td>
</tr>
<tr>
<td width="15" rowspan="3" bordercolor="#6699FF" bgcolor="#66CCFF">&nbsp;</td>
<td width="175" height="298"><form action="" name="frmWrdList" id="frmWrdList">
<span class="style5"></span><font color="#3366CC" size="1">
<input name="vocabWrdChosen" type="text" id="vocabWrdChosen" size="20" />
</font><br />
<label>
<select name="vocabList" size="10" class="style5" id="vocabList" onchange="MM_setTextOfTextfield('vocabWrdChosen','',''+(voca bList[vocabList.selectedIndex].text)+'');document.frmWrdList.submit()">
<?php
do {
?>
<option value="<?php echo $row_wrdList['picID']?>"><?php echo $row_wrdList['vocabWord']?></option>
<?php
} while ($row_wrdList = mysql_fetch_assoc($wrdList));
$rows = mysql_num_rows($wrdList);
if($rows > 0) {
mysql_data_seek($wrdList, 0);
$row_wrdList = mysql_fetch_assoc($wrdList);
}
?>
</select>
</label>
<span class="style5"> </span>

</form> </td>
<td width="427" bgcolor="#FFFFCC"><div align="center">
<p><?php echo $_GET['vocabWrdChosen']; ?></p>
<p>
<?php do { ?>
<img src="dbPics/<?php echo $row_picIDs['picFileName']; ?>" alt="picture" />
<?php } while ($row_picIDs = mysql_fetch_assoc($picIDs)); ?></p>

<table border="0" width="50%" align="center">
<tr>
<td width="23%" align="center"><?php if ($pageNum_picIDs > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_picIDs=%d%s", $currentPage, 0, $queryString_picIDs); ?>"><img src="First.gif" border=0></a>
<?php } // Show if not first page ?>
</td>
<td width="31%" align="center"><?php if ($pageNum_picIDs > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_picIDs=%d%s", $currentPage, max(0, $pageNum_picIDs - 1), $queryString_picIDs); ?>"><img src="Previous.gif" border=0></a>
<?php } // Show if not first page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_picIDs < $totalPages_picIDs) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_picIDs=%d%s", $currentPage, min($totalPages_picIDs, $pageNum_picIDs + 1), $queryString_picIDs); ?>"><img src="Next.gif" border=0></a>
<?php } // Show if not last page ?>
</td>
<td width="23%" align="center"><?php if ($pageNum_picIDs < $totalPages_picIDs) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_picIDs=%d%s", $currentPage, $totalPages_picIDs, $queryString_picIDs); ?>"><img src="Last.gif" border=0></a>
<?php } // Show if not last page ?>
</td>
</tr>
</table>
</div></td>
<td width="15" rowspan="3" bordercolor="#6699FF" bgcolor="#66CCFF">&nbsp;</td>
</tr>
<tr>
<td height="15" colspan="2" bordercolor="#6699FF" bgcolor="#66CCFF">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><form action="" name="alphabet" id="alphabet">
<table width="602" border="0" cellpadding="0" cellspacing="0" id="tblAlpha" summary="Table for alphabet radio buttons">
<tr>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="a" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "a")
print " checked = \"checked\" "; ?> />
a</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="b" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "b")
print " checked = \"checked\" "; ?> />
b</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="c" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "c")
print " checked = \"checked\" "; ?> />
c</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="d"<? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "d")
print " checked = \"checked\" "; ?> />
d</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="e" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "e")
print " checked = \"checked\" "; ?> />
e</label>
</span></td>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="f" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "f")
print " checked = \"checked\" "; ?> />
f</label>
</span></td>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="g" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "g")
print " checked = \"checked\" "; ?> />
g</label>
</span></td>
</tr>

nrenfree
03-19-2007, 06:18 PM
<tr>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="h" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "h")
print " checked = \"checked\" "; ?> />
h</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="i" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "i")
print " checked = \"checked\" "; ?> />
i</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="j" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "j")
print " checked = \"checked\" "; ?> />
j</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="k" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "k")
print " checked = \"checked\" "; ?> />
k</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="l" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "l")
print " checked = \"checked\" "; ?> />
l</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="m" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "m")
print " checked = \"checked\" "; ?> />
m</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="n" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "n")
print " checked = \"checked\" "; ?> />
n</label>
</span></td>
</tr>
<tr>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="o" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "o")
print " checked = \"checked\" "; ?> />
o</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="p" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "p")
print " checked = \"checked\" "; ?> />
p</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="q" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "q")
print " checked = \"checked\" "; ?> />
q</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="r" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "r")
print " checked = \"checked\" "; ?> />
r</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="s" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "s")
print " checked = \"checked\" "; ?> />
s</label>
</span></td>
<td width="86"><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="t" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "t")
print " checked = \"checked\" "; ?> />
t</label>
</span></td>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="u" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "u")
print " checked = \"checked\" "; ?> />
u</label>
</span></td>
</tr>
<tr>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="v" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "v")
print " checked = \"checked\" "; ?> />
v</label>
</span></td>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="w" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "w")
print " checked = \"checked\" "; ?> />
w</label>
</span></td>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="x" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "x")
print " checked = \"checked\" "; ?> />
x</label>
</span></td>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="y" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "y")
print " checked = \"checked\" "; ?> />
y</label>
</span></td>
<td><span class="style4">
<label>
<input name="alphabet" type="radio" onclick="if(this.checked) this.form.submit();" value="z" <? if( isset($_REQUEST["alphabet"]) and $_REQUEST["alphabet"] == "z")
print " checked = \"checked\" "; ?> />
z</label>
</span></td>
<td width="86">&nbsp;</td>
<td width="86">&nbsp;</td>
</tr>
</table>
</form> </td>
</tr>
<tr bordercolor="#6699FF" bgcolor="#66CCFF">
<td height="15" colspan="4">&nbsp;</td>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($wrdList);

mysql_free_result($picIDs);

mysql_free_result($vocabWrdChosen);
?>


Thank you ALL for your help.

Nancy

davidj
03-20-2007, 08:44 AM
im sorry but there is very little i can do...

please dont take this the wrong way but You cant polish a turd

you dont understand the concepts of PHP and code and thats your first problem. The code has been dynamicaly created using Dreamweaver

the clue which gave away your level of expertise was...
<?php require_once('Connections/instantVocab.php'); ?>
<?php require_once('Connections/instantVocab.php'); ?>
<?php require_once('Connections/instantVocab.php'); ?>

If i was to fix this then you would be back very soon with the next problem and the next and when you have exhausted all the buttons and extensions that dreamweaver provides then you will be back asking how to add functionality and thats where you will regret pushing the buttons in the first place.

first you need to help me, help you by learning php and you should get a basic understanding here

http://www.dreamweaverclub.com/vtm

If you meet me in the middle i will show you the mistic arts of PHP and programming

nrenfree
03-20-2007, 05:25 PM
I appreciate your honesty.

The personal attacks were slightly rude... "You cant polish a turd" and "...you would be back very soon with the next problem...."

I understand your level of expertise far outstrips my pitiful level of trying to learn as I go and studying the code Dreamweaver produces.

As a matter of fact, I am currently reading O'Reilly's book on Apache, PHP and MySQL.

I won't bother you again.

Nancy

davidj
03-21-2007, 08:52 AM
The personal attacks were slightly rude...

Nancy

i appologise if i have offended but you have to understand my point

i am here to help and i give allot of my time to members on this forum. I never beat my chest with knowledge as i want everyone on here to code to a level where they could add PHP on their CV. That is my prime goal

all i want to do is help people develop their skills but i need a foundation of skill to work with.

you presented me with Dreamweaver code which you didnt understand. If i was to say your includes are incorrect; Which is the case, Would you know what i was on about? or would you want me to take the code and make it work by rewriting it myself?

I appologise for the polish a turd analogy and do hope you can forgive me (holds head in shame)

all i wanted to do was help you so lets start again and see how we go

you will get used to me after a while.

If anyone thinks that i am rude then please add a comment and i will endevour to change my ways.

nrenfree
03-21-2007, 05:46 PM
I accept your apology. No harm done. :-D The community is lucky to have people willing to share their knowledge.

I have printed out all the code and am going through it, figuring out as I go. I found a number of instances of repeated code which I excised.

I do not wish you to rewrite for me. That would be a waste of both of our time. I would learn nothing. I was hoping for pointers to a section and suggestions of code I might look into.

When I have a more detailed question, with a higher level of understanding behind it, I will return. (Kind of like MacArthur)

Nancy

Andromeda
03-21-2007, 07:41 PM
If anyone thinks that i am rude then please add a comment and i will endevour to change my ways.

yeah, I thought the turd analogy was a tad over the top but it was effective!! If it had been me I would probably have gone for something like "you can't teach a duck Latin" but then again, if it had been me, Nancy wouldn't be getting any help at all with her problem!!!

nrenfree
03-21-2007, 07:48 PM
if it had been me, Nancy wouldn't be getting any help at all with her problem!!!That was unnecessary. I came in here asking politely for assistance. I will not apologize for being a beginner. Unless you actually ARE an alien, you too were a beginner once. I am sorry no one helped you and you were scarred by the experience.

Andromeda
03-21-2007, 08:31 PM
Hi Nancy

What I meant was that while I felt Davidj was a bit abrupt, he has a wealth of information and is really really helpful whereas I, who wouldn't tend to be quite so abrupt, wouldn't be able to help you at all because I don't know half (or even quarter) of what davidj knows. I haven't a clue when it comes to php. It's not that I'm unwilling to help you, it's just that I CAN'T help you.

My apologies if my previous post read wrongly.

davidj
03-22-2007, 08:45 AM
Nancy nancy nancy...

your way too sensitive. You need to cool your burners.

I found a number of instances of repeated code which I excised.

excellent. Now thats the kind of person i want to teach


with a higher level of understanding behind it, I will return


please take 1 hour out of your day and follow these..

http://www.dreamweaverclub.com/vtm/php-mysql-apache.php

it will; i promise, become clearer.

stoneygossard
03-29-2007, 11:16 PM
first you need to help me, help you by learning php and you should get a basic understanding here

http://www.dreamweaverclub.com/vtm

If you meet me in the middle i will show you the mistic arts of PHP and programming

Nice one David,

I totally agree, I have given up on DW generated code. No learning benefits whatsoever.

Stoney