AJAX | JavaScript | HTML | PHP Answers

Questions answered by Experts: 166

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Hello ,(php and mysql question)
I want to create a php search engine that searches people in the same country and city as the user for restaurants in that area....
please give me the code as fast as possible
Write a method in Java which is passed a character (recursion) that prints all characters between ‘a’ and that character.

For example user entered: f ......... then the output should be: abcdef
[code]actually problem is that i search records in mysql a table through ajax code and again insert with further records in another table searching successfull but again insert not successful plz guid me only search seat numbers, type marks mid, lab, terminal and submit with mid lab terminal marks seat numbers
this is main pae
enter_marks.php
[b]Seat Numbers[/b]


//this is insert code
if (!empty($_POST['teacher']))
{
if($search=mysql_query("select Seat_Number from student_enroll where Batch='$_GET[batch]' and Semester='$_GET[semester]' and Degree='$_GET[degree]'"))
{
while($row=mysql_fetch_array($search))
{
$insert="insert into enter_marks_teacher & (Full_Name,Course_Number,Dept_Name,Degree,Batch,Semester,Seat_Number,Mid,Lab,Terminal,Total,Remarks,Percentage,Grade,CGPR) values('$_GET[teacher]','$_GET[course]','$_GET[dept]','$_GET[degree]','$_GET[batch]','$_GET[semester]','$_GET[seat]','$_GET[mid]','$_GET[lab]','$_GET[terminal]','$total','$d','$per','$grade','$gp')";




include_once("connect.php");
if(!mysql_query($insert))
{
die('error in insert query');
}
else
{
echo("1 Record added");
}
}
}




}[/code]
How to create documentation in java?
How can I encrypt my password?
Write a script that inputs a telephone number as a string in the form (555)555-5555. The script should use String method split to extract the area code as a token, the first three digits of the phone number as a token and the last four digits of the phone number as a token. Display the area code in one text field and the seven-digit phone number in another text field.
How do I create a hyperlink with text that will open (or display) a list <ul> below, using <onClick> tags, when selected; then when selected again will close the list?
QUESTION 1
Answer in javascript ..You are given a table that shows the total number of cars sold by a local car manufacturer in Johor Bharu for the first six months in the year 2008.

Month Jan Feb Mar Apr May Jun
Number of cars sold (units) 191 196 269 308 236 145
Based on the figures given above, you required to write a Java program using array which can perform the following:

• Average number of cars sold
• The month that achieve lowest sales
What is difference between ID and CLASS selector in css?
Hi all could someone help me out with this please.

You will have seen that the outline code also contains a partially written function ubbiDubbi() which is to take a string argument and translate it into Ubbi Dubbi according to the rule we are using.
Currently this function declares and initialises some variables but contains no code that will actually translate the argument. The structured English below describes the algorithm necessary to perform the translation. For convenience we have numbered the steps.
1.
initialise precedingCharacter to an empty string
2.
for each position in the string
3.
assign the character at that position to currentCharacter
4.
if (isVowel(currentCharacter) AND (NOT isVowel(precedingCharacter))
5.
concatenate 'ub' to the result string
6.
end if
7.
concatenate currentCharacter to the result string
8.
assign the current character to precedingCharacter
9.
end for
10.
return the result string


Does anyone know what code goes in the script below from the stuctured english above thanks





// Program to translate a message into "Ubbi Dubbi"


// PROVIDED FUNCTION -- you do not need to change it

/*
* determines if the argument is a vowel
*
* function takes one argument representing a character to be tested and returns
* -- true if the argument is a single uppercase or lowercase character which is a vowel
* -- false otherwise .
*/
function isVowel(aCharacter)
{
return ((aCharacter == 'a') || (aCharacter == 'A')||
(aCharacter == 'e') || (aCharacter == 'E')||
(aCharacter == 'i') || (aCharacter == 'I')||
(aCharacter == 'o') || (aCharacter == 'O')||
(aCharacter == 'u') || (aCharacter == 'U')||
(aCharacter == 'y') || (aCharacter == 'Y'));
}


// INCOMPLETE FUNCTION -- supply missing code where indicated for part (ii)(a)

/*
* translates a word into Ubbi Dubbi
*
* function takes a string argument and returns a second string
* which is the first one translated into Ubbi Dubbi.
*/
function ubbiDubbi(aString)
{
// variable to hold resultString
var resultString = '';

// variable to hold the current and previous characters
var currentCharacter;
var precedingCharacter;

// in the case of the first character in the string there is no
// previous character, so we assign an empty string '' to the variable at first
precedingCharacter = '';

// TODO part (ii)
// add code as directed in the question
}

// TEST 1
var string1 = 'the cat sat on the mat';
var result1 = ubbiDubbi(string1); // result should be 'thube cubat subat ubon thube mubat'
document.write(string1)
document.write('<BR>');
document.write(result1)
document.write('<BR>');
if (result1 == 'thube cubat subat ubon thube mubat')
{
document.write('test passed');
}
document.write('<BR>');
LATEST TUTORIALS
APPROVED BY CLIENTS