Hey guys, So I've been devloping a TV Guide website that will allow you to fill out a variety of different fields, then searches the database for that information, and returns the results. The way I have it right now, the user has to fill out all of the fields in order for the search to work properly. I want to have it so even if the user only enters information for one field, it will ignore all of the empty fields, and still search the database. Here is the code for the form: <form method="POST" action="guideresult.php"> <table cellspacing="7" cellpadding="0" …

Member Avatar
Member Avatar
+0 forum 8

Hello, I am currently trying to develope a perl CGI script that will allow a user to enter a name on an HTML form, and it will search the database with that name. Once it finds the matched names, it will display their name and telephone number on the screen. I'm not completely sure how to go about this, so I was wondering if anyone could share any sort of insight. Thank you very much in advance. **HTML FORM** <HTML> <HEAD><TITLE>Search Telephone Number</TITLE></HEAD> <BODY BGCOLOR=#FFFFCC> <H3>Search A Telephone Number</H3> <FORM ACTION="project2_searchnum.pl" METHOD=POST> <TABLE> <TR> <TD>Name:</TD> <TD><INPUT NAME=fullname SIZE="20"></TD> </TR> </TABLE> …

Member Avatar
Member Avatar
+0 forum 1

This is what I currently have so far. The script needs to Add, Edit, Search, and View the address_file. Any help would be greatly appreciated. [code] trap "rm ./f 2> /dev/null; exit" 0 1 3 addressfile=~/address_file loop=x while test $loop = "x" do clear tput cup 3 12; echo "Address Book Menu" tput cup 4 12; echo "=================" tput cup 6 9; echo "S - Search For Address" tput cup 7 9; echo "A - Add Address" tput cup 8 9; echo "R - Remove Address" tput cup 9 9; echo "E - Edit Address" tput cup 10 9; echo …

Member Avatar
Member Avatar
+0 forum 3

Hello, I've created a simple menu that will execute some commands, and display them on the screen. However, when I try to execute them in the menu, nothing appears. I was not sure if I went about this the right way. Any help is appreciated. [code] trap "rm ./f 2> /dev/null; exit" 0 1 3 projectfile=!/project1 loop=y while test $loop = "y" do clear tput cup 1 12: echo "Welcome " logname; tput cup 3 12; echo "Project 1 Sample Menu" tput cup 4 12; echo "=====================" tput cup 6 9; echo "P - Display List Of Current Users" tput …

Member Avatar
Member Avatar
+0 forum 2

I'm trying to create a program where it reads in the high and low temperatures for each month of the year using a 2D array. However, I cannot seem to get it working correctly. It outputs a bunch of strange numbers. [code] #include <iostream> #include <iomanip> using namespace std; const int MONTHS = 12; void getData(double [][2], int); int main() { double temperatures[MONTHS][2]; getData(temperatures, MONTHS); return 0; } void getData(double t[][2], int m) { int i, j, k; for(i=0; i < m; i++) { cout << "Enter higest temperature for the month " << i+1 << ": "; cin >> …

Member Avatar
Member Avatar
+0 forum 3

I'm creating a voting program in which you input the persons name and how many votes they have received. It than prints out the persons name, their amount of votes and the percentage of their votes from the total. I can't seem to get the percent of total to work correctly, everything else is working fine. I'm also aware that nothing lines up correctly, i'll be fixing that after I get it working. Any ideas? thanks. [code]#include <iostream> #include <iomanip> #include <String> using namespace std; int sumVotes(int list[]); int winnerIndex(int list[]); int votes[20]; double percent[10]; int main() { string name[10]; …

Member Avatar
Member Avatar
+0 forum 7

Hey, I want to start this new project for my own site, but I'm not really sure on how to start. Was wondering if anyone could help start me off, with some ways to organize and start it out. Basically I want to start a hockey league script, that contains 30 teams and it tracks stats for that team, and the players on those teams. I've created a script that can handle a single team site, now I just want to expand it to a league script that can handle multiple teams at once. If anyone knows how I would …

Member Avatar
Member Avatar
+0 forum 2

Alrite, So i have a an entry page with a form on it, that simply enters the data into the specified database. I have a player stats entry page, and there are five lines for players. However, if not all 5 players play, I want it to check if that field is empty, and if it is, i don't want it to enter it into the database. Because when i enter a game, and i leave a player field blank, all it does is enter in all 0's for that player.

Member Avatar
Member Avatar
+0 forum 3

Hey, I have yet another question, so here it is. I have a roster page, and i have multiple players on the page. The players each have a unique playerid stored in the database. Now what i want to do is link up their name on the roster list that has their playerid in the url. It will than link to another page, and post all the players information based on that specific id. I believe its call parameter passing in a URL, if im right. Any way, here is the code i currently have. CODE: [url]http://bryan26.pastebin.com/4mK5HGk9[/url]

Member Avatar
Member Avatar
+0 forum 1

So i have a system, and i was creating a page to input player stats. However there are 5 rows that have be inserted per game from a single form. I have the code for the form and the insert code. I was just wondering if someone could help me so it will insert all 5 rows in the form into a desired table when entered through the form. Thanks Form: [url]http://pastebin.com/C3pv2uAj[/url] Insert Code: [url]http://pastebin.com/NDZryVZc[/url]

Member Avatar
Member Avatar
+0 forum 7

Hey, i was wondering if it was possible to find the sum of all the values in certain row and than find the max value of all of them. I have the following code, but it only grabs the largest value from all the rows, is it possible to sum all them, and than grab the max based on the persons playerid? [code=php]$result = mysql_query("SELECT gamertag, goals FROM player_stats WHERE goals = (select Max(goals) from player_stats)GROUP BY playerid; ");[/code] ----------------------------------------------------- Is it also possible to grab a profile picture from another table based on the code above?

Member Avatar
Member Avatar
+0 forum 2

Alrite so i am trying insert new values into my table, and when i try to, i get the following error [code]#1062 - Duplicate entry 'Hit Em High' for key 'team_home' [/code] Any idea how to fix this? I've heard it could be a primary key error, but im not sure. Thanks!

Member Avatar
Member Avatar
+0 forum 2

Hello, I am trying to link up a certain row i am outputting on a site. How would i go about putting multiple lines inside of one echo statement. [code=php]echo "<a href='profile.php?player_id=>'".$row['gamertag']."</a>";[/code] That is the current code i am using, but it is now, working, any idea on how to make it work?

Member Avatar
Member Avatar
+0 forum 1

The End.