Archive for the ‘Question and Answer’ Category

Java Script Validation Help….?

http://www.thewebhelp.com/php/php_contac…

I have found this form, it quite easy , to modify , but I cant get validation get to work. Well I have addred field “Name” and i dont know how to make sure that the person will send the name.
Can someone help me please.
I have tryed the forum but no one seems to help.

Help Me To Connect Php With Mysql?

I’ve PHP, Mysql and apache installed on my pc, everything
is working fine. Now I tried this code to connect PHP with
mysql :
<?php
$connection=mysql_connect('localhost',… or
die(mysql_error());
echo "Connected to MySQL
“;
?>
My administrator name is India and password is sand.
when i run the PHP script the web browser shows this :-
Warning: Access denied for user: ‘admin@localhost’ (Using
password: YES) in c:\apache\htdocs\mysqlconnect.php.php on
line 6
Warning: MySQL Connection Failed: Access denied for user:
‘admin@localhost’ (Using password: YES) in
c:\apache\htdocs\mysqlconnect.php.php on line 6
Access denied for user: ‘admin@localhost’ (Using password:
YES)
plz tell me whats wrong n what to do?

I Need Your Help , Basic Question Of Internet And Computer Plz Help Me.?

My friend has a exam .please let me the following answer.
1) __cut_/out key________ key is used to super impose one video over another by filtering out the background
48. To automatically open an audio or a video file in a specified application, one must ____register___________ the file with that progra
2) Which of the following is not a server side scripting language?
* ASP/ASP.NET(*.asp/*.aspx)
* ColdFusion Markup Language (*.cfm)
* Java via JavaServer Pages (*.jsp)
* PHP (*.php)
* Perl (*.pl)
* Python (*.py)
* Ruby_(programmi
ng_language) (*.rb)
* Lasso_(programming_language) (*.lasso)
* JavaScript (*.js)
3) A website which gives general but exhaustive information is called _______
A document specially designed for the internet is called ___________
4) The process of creating a portable video format from your editing software is called ______
5) The software that allow you to create and watch different formats of films is called Video Editor________
Thanks in advance please give me the following answer.

Web Design?

.php : php
.pl : perl
.html: HTML
.ws : …?
basically if a site has a ending of .php, that page has php programming on it, .pl is for perl, html is HTML, what web design/scripting/programming language is a “.ws” website ending associated with?
Thank you

Javascript Is Being Mean…

I have this for PHP…
<?php ///if there is a problem here, put sessionstart at top
$idNum = $_POST['idNum'];
//Questions table
$Query = "SELECT * FROM questions WHERE surveyid = '" . $idNum . "'";
$result = mysql_query($Query);
if (!$result)
{
echo "Could not successfully run query ($sql) from DB1: " . mysql_error();
exit;
}
if (mysql_num_rows($result) == 0)
{
echo "No rows found, nothing to print so am exiting1";
exit;
}
//Survey table
$Query2 = "SELECT numQuest FROM surveys WHERE id = '" . $idNum . "'";
$result2 = mysql_query($Query2);
if (!$result2)
{
echo "Could not successfully run query ($sql) from DB1: " . mysql_error();
exit;
}
if (mysql_num_rows($result2) == 0)
{
echo "No rows found, nothing to print so am exiting1";
exit;
}
$rows2 = mysql_fetch_assoc($result2);
$ctr = 1;
while($rows = mysql_fetch_assoc($result))
{
if ($ctr == 1)
{
//echo "GOT HERE";
echo "
“;
echo “ “;
echo “”;
echo “” . $rows['question'];
echo “”;
$ctr ;
}
and so on…
and my Java script isnt working which is:

function moveup() {
var thisline = document.Form10.quest.options.selectedIn…
var lineabove = thisline – 1
//alert(‘lineabove = ‘ lineabove)
if (thisline >= 1) {
{document.Form10.holding.value = document.Form10.quest.options[lineabove]…
//alert(‘document.Form10.holding.value = ‘ document.Form10.holding.value)
{document.Form10.quest.options[lineabo… = document.Form10.quest.options[thisline].…
{document.Form10.quest.options[thislin… = document.Form10.holding.value}
document.Form10.quest.options.selected… = lineabove;
}
// end if
}
// end of moveup
function movedown() {
var thisline = document.Form10.quest.options.selectedIn…
var linebelow = thisline 1
//alert('lineabove = ' lineabove)
if (linebelow < 15) {
{document.Form10.holding.value = document.Form10.quest.options[linebelow]…
//alert('document.Form10.holding.value = ' document.Form10.holding.value)
{document.Form10.quest.options[linebel… = document.Form10.quest.options[thisline].…
{document.Form10.quest.options[thislin… = document.Form10.holding.value}
document.Form10.quest.options.selected… = linebelow;
}
// end if
}
// end of movedown

…What am i doing wrong?

A Different Background Color Depending On The Radio Button Selected?

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 “

  • $a


  • “;
    }
    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.

    Mysql_fetch_assoc(): Supplied Argument Is Not A Valid Mysql Result Resource?

    This table is trying to read off of a siteAccessTbl which has two tables related to it. When I run it, I receive this error.
    PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/html/php/getSiteAccessTblInfo.p… on line 15
    There are two scripts, and one is included in the other. I do not understand how to make these tables work. Please help!! Thanks in advance!!
    FINDACCESSINFOTBL.PHP

    GETSITEACCESSINFO.PHP

    Actionscript Help…making Flash Email Form!!

    Prefer an expert in Flash actionscript!!!
    -ITS LENGTHY BUT ONLY CUZ I POSTED SCRIPTS!!
    I am working on an email form on Flash and I got most of it done. However theres a small mistake that I cant seem to find.
    *Heres my actionscript (please check the “if” part since the problem is there):
    stop();
    var senderLoad:LoadVars = new LoadVars();
    var receiveLoad:LoadVars = new LoadVars();
    sender.onRelease = function() {
    senderLoad.Name = Name.text;
    senderLoad.Email = Email.text;
    senderLoad.Phone = Phone.text;
    senderLoad.Message = Message.text;
    senderLoad.sendAndLoad
    (“http://mainlinejerky.com/index/
    mainlinemail.php”,receiveLoad);
    }
    receiveLoad.onLoad = function() {
    if(this.sentOk) {
    _root.gotoAndStop(“success”);
    }
    else {
    _root.gotoAndStop(“failed”);
    }
    }
    *heres my PHP:

    MY problem is that even when the fields are empty, one can still submit the form without playing my “failed” message.
    What do I need to do? What can I add to play my “failed” message when a field is empty?
    Thanks in advanced! Hope the info provided is helpful!

    Php, Php, Php, Php, Php?

    Given: an array of numbers: {5,4,6,5,6,6,7,8,9,3}
    Requirement: The script counts how many occurrences of each number were entered in the array. Afterwards, print all the values with the corresponding number of occurrences.
    Additional clause: you may not use array functions

    I’m Trying Basically To Convert An Xml File To A Php Script That Outputs The Identical Code.?

    The original XML file looks something like this.

    Dallas.
    Tresnjevka. I love the atmosphere on this one.
    Motovun.
    New York.
    Paris.

    Color mayhem!
    The sleeping monster.
    Let me out!
    A barrel on the side of the trail.
    Subterranean passage.
    A train in snow.

    Here’s my php
    <?PHP
    $xml = '’;
    $gallPath = ‘/gallery/’;
    $link = mysql_connect (“localhost”, “root”, “”);
    mysql_select_db (“test”);
    $query = ‘SELECT * FROM galleries’;
    $results = mysql_query($query);
    echo “$xml\n”;
    echo “\n”;
    while ($line = mysql_fetch_assoc($results)) {
    echo “\n”;
    echo “\n”;
    echo “\n”;
    }
    echo “”;
    mysql_close($link);
    ?>
    But the output isn’t the same. I’ve changed a few things, obviously, but I would just like that based on the table field galleryTitle, the php would echo each item with that title and then close the node, instead of closing the node after each item.
    Does that make sense?