Posts Tagged ‘A’
A Different Background Color Depending On The Radio Button Selected?
September 11th, 2009
phpmoz I need a little help… Please…
I am working on a script but I can’t get one part…
<?php
$Fname = $_POST['Fname'];
$Lname = $_POST['Lname'];
$gender = $_POST['gender'];
$major = $_POST['major'];
$activities = $_POST['activities'];
$email = $_POST['email'];
$comments = $_POST['comments'];
$bgcolor = "";
If ($_POST['gender'] == 'male') {
$bgcolor == "Blue";
} elseif($_POST['gender'] == 'female') {
$bgcolor == "Pink";
}
{
echo "$Fname $Lname, “;
echo “Thank you for completing the survey we have noted that you are are a student majoring in $major who is active in the following clubs:“;
foreach ($activities as $a) {
echo “
“;
}
echo “Your comments $comments have been fowarded to the appropriate person. They may reply to your email address $email”;
}
?>
I need the table in the middle to change colors depending on the gender that is selected.
Can any one help me figure this out… I have tried everything
Vickie S.
Need A Php Expert For Some Theory Help! I Do Not Want Explicit Code, Just Some Ideas On How To Go About It.?
September 5th, 2009
phpmoz Here is what I have so far. I populate a table dynamically from my database and include check boxes. I need to be able to modify the text fields, then have only the checked rows updated in my db. I am stuck on how to determine which boxes are checked, and then how to post the correct rows to my modify script. I can modify with sql and delete with sql, just do not know how to transfer the data from an html table by checked rows to my other page. Any help would be greatly appreciated. Here is my code. I am not loooking for specific code examples, that would be cheating. I just need to know if what I am doing is possible and some ideas on where to go with it. NOTE: I commented out the session so it will not affect someone trying to view the table.
How To Set Up A Mysql Database For A Php/java Poll?
September 4th, 2009
phpmoz Hi, on my site I have a polls page where have a list of questions that are usually made from a radio group. I’m wanting to take the answers and use Javascript to forward the answer to a mySQL database using PHP. I went to: http://www.w3schools.com/php/php_ajax_da… which has a very nice explination of mySQL, but it didn’t really help much.
I’m wanting to have a table that contains the answers and a value. I’m wanting to make that value go up one each time someone votes for that value on the polls page. Also, on a seperate page I have the current number of votes. How exactally would I do this?
ex. What do you prefer?
Radio1: Sweet
Radio2: Sour
After an answer is selected (let’s say sweet) the script adds 1 to the number of votes for that answer on the mySQL database. Then the person is redirected to the page that shows the total number of votes for both answers. (let’s say 40 people said sweet, and 42 said sour).
Can anyone help me with this?
Php Cannot Include A File Only When Accessing The Website With Ssl. Why?
August 31st, 2009
phpmoz I can access my webpage using http or https. When I access using http (i.e., http://www.site.com/myscript.php ), the PHP script works fine. When I access using https (i.e., https://www.example.com/myscript.php ), PHP fails because it cannot access files that are include’d in the script. I’ve checked and the the include_path is the same. What’s wrong?
Hi I Have A Php Script That I Need To Run Via Cron Daemon.?
August 28th, 2009
phpmoz Hi I have a php script that I need to run via Cron Daemon. The script runs perfectly from the browser address bar but not as a Cron job.
Here is the script:
Code:
get_var($SQLstmt);
if($complete == 1){
header(‘Location: http://www.mywebsite.com/sendreminder.ph…
}
?>and this is the error I get via email:
/hsphere/local/home/paulkili/buzzmesms… ?php: No such file or directory
/hsphere/local/home/user/mywebsite.com… line 2: syntax error near unexpected token `mysql_connect(”
/hsphere/local/home/user/mywebsite.com… line 2: `$connection = mysql_connect(‘mydatabase’,'Iamtheuser’,…
What am I missing if it runs fine from the address bar why not via Cron Daemon. Pls help me I have now tried every thing I know.
Need Help With A Php Script.?
August 27th, 2009
phpmoz I know very little about PHP and was hoping I could find some help here. I have one piece of PHP built into my html that reads:

Posted in
Tags:

