here is a small chunk of the code I have so far.
[HTML]<TR>
<TD bgcolor="#C0C0C 0" width="300"><FO NT COLOR="#000000" ><INPUT TYPE="radio" value="<?php echo $pass[Favorite]; ?> -<?php echo $pass[Spread]; ?>" NAME="Game01" <? if($pass[Game01]== "$pass[Favorite] -$pass[Spread]"){ echo "checked"; } ?>></FONT><?php...
User Profile
Collapse
-
Hidden Form items with javascript
Hello All,
Can someone tell me if this is possible, and if so, please direct me in the right direction on a method>
I have a form, with radio buttons.... each question has 3 possible radio selections... either yes, no , or no answer.
What I want to do, is hide individual questions based on the day, or a time of day.
Any help would be great,
Thanx,
Pat... -
HTML Form w/ time based options??
Hello All,
Can someone tell me if this is possible, and if so, please direct me in the right direction on a method>
I have a form, with radio buttons.... each question has 3 possible radio selections... either yes, no , or no answer.
What I want to do, is hide individual questions based on the day, or a time of day.
Any help would be great,
Thanx,
Pa... -
I think my problem lies in the IF statement... I think it may be in the syntax...I have tried everything..
I am trying to do (IF user_name=='$ro w[user_name]') where user_name is pulled from the Standings table, and '$row[user_name]' is coming from the "PICKSHEET" table in the code above....I tried changing the STANDINGS table fied to Name incase there was a conflict there to now be...(IF Name=='$row[user_name]').. by doing...Leave a comment:
-
I now have it to the point where if no records are in the Database, it will insert them into it. If some records are in the database, it will insert new records if there are any, but..... It wont update any current values, I get an error, being....
Error: Duplicate entry 'The Swammi' for key 1 if I set user_name to primary key, and if I take away the primary key feature, then it just adds more records with the same user_name...so I get duplicate...Leave a comment:
-
Not passing all records to mysql
Hello All,
I am trying to pass records to a mysql database, but it is only passing 1 record...
What I have so far, is it pulls selections from database, calculates weather the selection is a winner or a loser or a tie, prints out to the screen correctly, but when posting the results to the database, it only sends the first record, and not all the records even though they calculated. Hope fully someone can give me some assistance... -
Adding of current value to stored value
Hello All,
Here's my delimna, I am trying to keep a running total of 1 value while maintaining a weekly value of others...this is what I am trying to do....
[PHP]//Update/Insert total wins to seperate database
$sel4="select *from Standings where user_name='$_SE SSION[user_name]'";
$result4=mysql_ query($sel4);
$num4 = mysql_num_rows( $result4);
if ($num4 != 0)... -
-
-
After adding a second name with values of teams picked, the second name doesnt add up the win total correctly either...ughhh
Patsman77
I am very new to this, so please be patient with me..I am trying very hard to learn this!!Leave a comment:
-
Line 4 <table> tag is closed at bottom of code...
It is also not giving right color code for value assigned?
Thanx for the reply!!
Patsman77Leave a comment:
-
Here is my current code:
It is almost right, except, it pushes the fields over by 1 spot??
[PHP]$sql="select *from matchups where week='1'";
$result=mysql_q uery($sql);
while ($sql = mysql_fetch_obj ect($result))
{
$pass[Week] = $sql -> Week;
$pass[Favorite] = $sql -> Favorite;
$pass[Underdog] = $sql -> Underdog;
...Leave a comment:
-
Changing cell color based on value?
Hello All,
I have been working on a little script, I am at a slight problem and was hoping for a little assistance.
I am trying to change the color of a cell in my table based on a value change:
It is a "Standings" page, where If a team has been noted as a "Winner", the cell be green, or if the team is a "Loser", then the cell color be red.
This is AMERICAN... -
Here is what I got now:
[PHP]$sql = "SELECT * FROM `admin` WHERE `Week` = '1'";
$result = mysql_query($sq l);
$pass = array();
while( $row = mysql_fetch_ass oc($result) )
{
$pass[] = $row;
}
mysql_free_resu lt($result);
$pass[GameID]=mysql_result($ result,$i,"Game ID");
$pass[Week]=mysql_result($ result,$i,"Week ");...Leave a comment:
-
Well, now it at least gets to the end of the code, but I get this error:
Parse error: parse error, unexpected $ in /home/swammisp/public_html/Mambo/swammiadmin2.ph p on line 203
line 203 is:
</html>
???? there is no $ there???
ThAnx,
Patsman77Leave a comment:
-
Well, i am getting further and further, I think with a little more assistance, I will finally be there. Sorry to ask for so much help, but I am in the learning process with this, especially arrays!
I have everything edited correctly now I think except for the drop down box selections....I f you can assist me with the first, it should take of the second and I will be done! Hopefully that is!!
So this part of the code??...Leave a comment:
-
Hello Again,
I use this line:
[PHP]echo "<td> <input type="Number" name="Week" size="5" MAXLENGTH="4" value="<? if($pass[0][Week]!=""){ echo "$pass[0][Week]"; } ?>" ></td>" ;[/PHP]
I get this error:
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/swammisp/public_html/Mambo/swammiadmin2.ph p...Leave a comment:
-
Ok, I changed the code with what you suggested, and I get no values carried onto my form from database....... just comes up with default values as if I entered nothing??
I should be replacing everything from the select statement down to the nysql close line....am I right in thinking this?
Thanx,
Patsman77
Btw, thanx for taking the time to answer my post!Leave a comment:
-
Getting Values from database with php/html form
I hope this is the right spot to post this....
I am working on a form to pull the information from the database. I am trying to use arrays, but I only get one record to come back and it is duplicated in both rows on my form.
the code is:
[PHP]<?php $sql="select *from admin Where Week='1'";
$result=mysql_q uery($sql);
$num=mysql_numr ows($result);
$i=0;
while ($i... -
No activity results to display
Show More
Leave a comment: