Jump to content

brax23

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

brax23's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Is there any way to use <body onload="history.go(-1)"> and <body onload="history.go(-1)"> without it refreshing the page? Or, is there another method that will navigate automatically to the previous page with it refreshing?
  2. Thanks very much jacksonmj. Works great.
  3. I think this is a pretty basic question and I hope I'm in the right place to ask it. I'm on a form page, when I hit my 'update' button I would like to navigate to another page, run some functions/queries, then navigate back to the previous form page without user input/interaction. I'm trying to use the onload function but I can't seem to get it right. I don't really even know if this is the correct way to automatically navigate. Any help would be appreciated.
  4. I'll try that. I need to learn multi dimensional arrays. One final really newb question. How do I put the [sOLVED] in the post header?
  5. Thanks very much DarkWater. Looks like it's working. It's only passing the values from the last menu/row but I think I can fix that by using multiple forms (one for each row of menu's) then name each menu differently. Again, thanks for your help, you sure save people like me a lot of frustration and I appreciate it.
  6. Darn it! Still no go. Can you tell me how to validate please?
  7. Thank you DarkWater. I'm actually working in in html and php so my code is: <?PHP mysql_connect(host_name,user_name, pass_word) OR DIE ('Unable to connect to database! Please try again later.'); mysql_select_db($dbname); $members_list = "<select name='name';'>"; $members_list .= "<option selected></option>"; $query_members = "SELECT ProjectNumber,ProjectName FROM projects ORDER BY ProjectNumber"; $result_members = mysql_query($query_members) or die("QUERY MEMBERS FAILED: ".mysql_error()); while ($line = mysql_fetch_array($result_members)) { $itemnumber = $line['ProjectNumber']; $description = $line['ProjectName']; $members_list .= "<option value='$itemnumber'>$itemnumber $description</option>"; } $members_list .= "</select>"; $codes_list = "<select name='code';'>"; $codes_list .= "<option selected></option>"; $query_codes = "SELECT WorkCode, Description FROM workcodes ORDER BY WorkCode"; $result_codes = mysql_query($query_codes) or die("QUERY MEMBERS FAILED: ".mysql_error()); while ($line = mysql_fetch_array($result_codes)) { $codenumber = $line['WorkCode']; $codedescription = $line['Description']; $codes_list .= "<option value='$codenumber'>$codenumber $codedescription</option>"; } $codes_list .= "</select>"; echo "<form method='get' action='Time_3.php'>"; echo "<table border='0' width='50%' cellspacing='0' cellpadding='1'>"; echo " <td><table border='0' width='100%' cellspacing='0'>"; echo " <tr>"; echo " <td width='5%'> </td>"; echo " <tr>"; echo " <td width='5%'> </td>"; echo " <td width='95%'> </td>"; echo " </tr>"; echo " <tr>"; echo " <td colspan='1'><table border='0' width='40%'>"; echo " <tr>"; echo " <td>Project: </td>"; echo " <td>Task Code: </td>"; echo " <td>Time: </td>"; echo " <td>Description: </td>"; echo " <tr></tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time1' size='2'> </td>"; echo " <td><input type='text'name='description1' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time2' size='2'> </td>"; echo " <td><input type='text' name='description2' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time3' size='2'> </td>"; echo " <td> <input type='text' name='description3' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time4' size='2'> </td>"; echo " <td> <input type='text' name='description4' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time5' size='2'> </td>"; echo " <td> <input type='text' name='description5' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time6' size='2'> </td>"; echo " <td> <input type='text' name='description6' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time7' size='2'> </td>"; echo " <td> <input type='text' name='description7' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time8' size='2'> </td>"; echo " <td> <input type='text' name='description8' size='140'></td>"; echo " </table></td>"; echo " </tr>"; echo " </table></td>"; echo " </tr>"; echo "</table>"; echo "<input type='submit' value='Submit' />"; echo "</form>"; ?> I still can't see where I've got any syntax errors on my second page trying to echo with $_GET['name'] or $_GET['code']. Although I did have an error on last post [[ but corrected it. Thanks for your help and patience with a beginner.
  8. Thanks wildteen88. You have helped me several times in these forums and I appreciate it. I've tried the $_POST and $_GET form methods on the first page where the menu is created but for some reason either the value is not passing or I'm not asking for it correctly. Here's the code on the next page where I'm simply trying to echo the value: echo $_GET['$members']; echo $_GET[['$codes_list'];
  9. I've researched but can't find anything that helps. I'm using the fetch_array function to query a table then build a drop down menu from the results. I have several drop down menus that I'm creating using the same fetch_array statement. I'd like to be able to pass each chosen variable/value from each of the separate drop down menus to the next page. Can someone suggest anything? Here's the code: $members_list = "<select name='name';'>"; $members_list .= "<option selected></option>"; $query_members = "SELECT ProjectNumber,ProjectName FROM projects ORDER BY ProjectNumber"; $result_members = mysql_query($query_members) or die("QUERY MEMBERS FAILED: ".mysql_error()); while ($line = mysql_fetch_array($result_members)) { $itemnumber = $line['ProjectNumber']; $description = $line['ProjectName']; $members_list .= "<option value='$itemnumber'>$itemnumber $description</option>"; } $members_list .= "</select>"; $codes_list = "<select name='code';'>"; $codes_list .= "<option selected></option>"; $query_codes = "SELECT WorkCode, Description FROM workcodes ORDER BY WorkCode"; $result_codes = mysql_query($query_codes) or die("QUERY MEMBERS FAILED: ".mysql_error()); while ($line = mysql_fetch_array($result_codes)) { $codenumber = $line['WorkCode']; $codedescription = $line['Description']; $codes_list .= "<option value='$codenumber'>$codenumber $codedescription</option>"; } $codes_list .= "</select>"; echo "<form method='get' action='Time_3.php'>"; echo "<table border='0' width='50%' cellspacing='0' cellpadding='1'>"; echo " <td><table border='0' width='100%' cellspacing='0'>"; echo " <tr>"; echo " <td width='5%'> </td>"; echo " <tr>"; echo " <td width='5%'> </td>"; echo " <td width='95%'> </td>"; echo " </tr>"; echo " <tr>"; echo " <td colspan='1'><table border='0' width='40%'>"; echo " <tr>"; echo " <td>Project: </td>"; echo " <td>Task Code: </td>"; echo " <td>Time: </td>"; echo " <td>Description: </td>"; echo " <tr></tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time1' size='2'> </td>"; echo " <td><input type='text'name='description1' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time2' size='2'> </td>"; echo " <td><input type='text' name='description2' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time3' size='2'> </td>"; echo " <td> <input type='text' name='description3' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time4' size='2'> </td>"; echo " <td> <input type='text' name='description4' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time5' size='2'> </td>"; echo " <td> <input type='text' name='description5' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time6' size='2'> </td>"; echo " <td> <input type='text' name='description6' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time7' size='2'> </td>"; echo " <td> <input type='text' name='description7' size='140'></td>"; echo " </tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time8' size='2'> </td>"; echo " <td> <input type='text' name='description8' size='140'></td>"; echo " </table></td>"; echo " </tr>"; echo " </table></td>"; echo " </tr>"; echo "</table>"; echo "<input type='submit' value='Submit' />"; echo "</form>";
  10. brax23

    Textarea Help

    Thank you adam84 for the help.
  11. brax23

    Textarea Help

    This code allows me to control the length of the text field but I would still like to have the text box span several rows while aligning with the top of the row, if that make any sense. <td><input type='text'name='description1' size='100'/></td>
  12. brax23

    Textarea Help

    Thank you adam84 this did work to adjust the text area. Please excuse my low knowledge level but I need to ask a couple more questions. I' using the code below after reading your hint.However, the <input type='text' name='description1> code shows up in the text box and I would like to enter data in the text area. Also, the "resized" text box is centering vertically in the middle of the row. Is it possible to have it align with the top of the row? Thanks very much for the help. <td><TEXTAREA COLS=100 ROWS=3 ID=txt><input type='text' name='description1'></TEXTAREA></td>
  13. brax23

    Textarea Help

    I'm having trouble with a bit of code. The code below shows I am producing 2 pull down menus and 2 text areas all on one row. I would like to adjust the width of the last input box and also number of rows it spans. I'm trying to use the 'textarea' tag but I can;t quite figure it out. Can anyone help please? echo "<form method='get' action='Time_3.php'>"; echo "<table border='0' width='50%' cellspacing='0' cellpadding='8'>"; echo " <tr>"; echo " <td><table border='0' width='100%' cellspacing='0'>"; echo " <tr>"; echo " <td width='5%'> </td>"; echo " </tr>"; echo " <tr>"; echo " <td width='5%'> </td>"; echo " <td width='95%'> </td>"; echo " </tr>"; echo " <tr>"; echo " <td colspan='1'><table border='0' width='40%'>"; echo " <tr>"; echo " <td>Project: </td>"; echo " <td>Task Code: </td>"; echo " <td>Time: </td>"; echo " <td>Description: </td>"; echo " <tr></tr>"; echo " <td>$members_list</td>"; echo " <td>$codes_list</td>"; echo " <td><input type='text' name='time1' > </td>"; echo " <td cols='2'> <input type='text' name='description1' ></td>"; echo " </tr>"; echo " </table></td>"; echo " </tr>"; echo " </table></td>"; echo " </tr>"; echo "</table>"; echo "<input type='submit' value='Submit' />"; echo "</form>";
  14. Thank you mbeals. Works like a charm.
  15. I have some code that I'm using to produce a drop down menu that is populated by a database table. When I pick one of the drop down items it directs me to the next page. The drop down menu is working. I'm trying to pass a variable (which is the value picked in the drop down) to the next page so I can simply echo the value on the page. It seems that I've tried echoing every variable I can think of but I can't get the value/variable to pass from one page to the next. The items I'm trying to echo on the next page are the 'ProjectNumber' and 'ProjectName' values that are in the drop down menu. Any suggestions please? Here's the code: echo "<h1 align='center'>SELECT PROJECT</h1>"; $members_list = "<select name='name' onChange='this.form.submit();'>"; $members_list .= "<option selected></option>"; $query_members = "SELECT ProjectNumber,ProjectName FROM projects ORDER BY ProjectNumber"; $result_members = mysql_query($query_members) or die("QUERY MEMBERS FAILED: ".mysql_error()); while ($line = mysql_fetch_array($result_members)) { $itemnumber = $line['ProjectNumber']; $description = $line['ProjectName']; $members_list .= "<option value='$itemnumber'>$itemnumber ".ucwords($description)."</option>"; } $members_list .= "</select>"; echo "<form method='get' action='Time_3.php'>"; echo "<table border='0' width='50%' cellspacing='0' cellpadding='8'>"; echo " <tr>"; echo " <td><table border='0' width='100%' cellspacing='0'>"; echo " <tr>"; echo " <td width='5%'> </td>"; echo " </tr>"; echo " <tr>"; echo " <td width='5%'> </td>"; echo " <td width='95%'> </td>"; echo " </tr>"; echo " <tr>"; echo " <td colspan='2'><table border='0' width='100%'>"; echo " <tr>"; echo " <td align='right' >Project: </td>"; echo " <td>$members_list</td>"; echo " </tr>"; echo " </table></td>"; echo " </tr>"; echo " </table></td>"; echo " </tr>"; echo "</table>"; echo "</form>"; ?> </div> </body> </html>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.