-
Posts
200 -
Joined
-
Last visited
Posts posted by mostafatalebi
-
-
Interesting....no replyyy
-
Hello everybody
I have made an upload form. I need to limit the file-support to several types.
PDF DOCX DOC ZIP RAR
What shall I do? I search the whole net and reach at no specific result.
How can I validate these specific files. Is pathinfo(PATHINFO_EXTENSION) enough? and if yes, how ?
-
Hello everybody
I need a function in my site that calculates the period between two dates. How shall I approach this?
$date_1 - $date_2 = $period
I want to be able to get a time in clean appearance. Such as: 2 Days and 3 Hours
Thanks in advance
-
-
Hello everybody
I have a file input in my upload form. I have fully styled it so that the whole input (button+textField) is invisible and a stylish button is in place. I want to make a <p> or a <div> or anything else to put in that the path of the selected file. How can I approach this?
thanks
-
-
Hello everybody
I have set my form's action to none so that I use inline code to process the form's submission. However I need to prevent the page from resubmitting the form when the user refreshes the page. How could I achieve this?
-
Thanks a million
-
Hello
How I can write functions in PHP which could have any number of arguments, and not a limited number, or a fixed/predefined number.
for instance:
function doCheck ($name, $lastname)
{
}
// the above function has two arguments and therefore is not dynamic. I want a function without any predefined number of argument and yet be able to receive variety of arguments (of course based on its functionality.)
Thanks in advance
-
Oh it is solved. I found the solution. I meant: $result->fetch_object()
-
Hello everybody
I have to get data from a table and arrange them in a descending order, so that the greater IDs be first in the array.
And I need to know that whether I have to use fetch_array or regular fetch().
thanks in advance
-
I'll come back with test.
-
I got it and didn't get it I need more instructions....I'm more than too beginner
-
This is my code
<body> <form action="" method="post" name="exm"> <input type="text" name="name"> <input type="text" name="x"> <input type="text" name="y"> <input type="text" name="z"> <input type="submit" name="submit" /> <script type='text/javascript' > function formValue () { document.forms['exm'].elements.value= "AAA"; } formValue; </script> </form> </body>
-
I have put:
document.Myform.elements.value = "something";
//but it does not work
-
Hello everybody
How to select All elements of a form and assign them a random value?
For instance I have a form which has ten inputs and I want to add to all of them a random value?
Thanks
-
-
Please Help me I have searched the net but I have not found a working solution. :'(
-
would you please explain more?
this is my heade:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-
logic is the same as you expect, but still doesn't
-
I have done this. But the problem is when the user submit the form the session updates to the new value
-
Hello I have to add persian language strings to the database out of a form through PHP.
Persian is right to left.
I have set sql table to utf8_persian, and when I use SQL direct interface to insert persian data, it works, and in HTML-PHP page I have many persian strings which all smoothly are rendered. But When I get the user data from a from in persian language, and through php mysqli statement want to add them into the table, they are added in strange characters.
I also have done mysqli_set_charset($link, "utf8");
What shall I do?
Thanks
-
Hello everybody
I have a problem in my form submission which I think could be easily solved by a pro programmer
Setting:
I have a form
At the end of the form I have put something like a CAPTCHA. There is a question, and a text input for the user to enter the answer.
So far everything works fine, the question is randomly generated without any problem.
But as soon as the user clicks on the submit button, the script regenerates the question which naturally has a different answer than the one the user has entered. What should I do to avoid execution of the function when the form is submitted??
However if somebody likes to see the script architecture here it is:
function randomSentenceGenerator () { php script } $question_and_answer_array = randomSentenceGenerator(); if(isset($_POST['submit']) { if(question != answer) { tell user to enter a correct answer } Include the HTML } else { include the HTML }
-
I have worked it out. the problem was many number associative arrays that I assign them values. Now with direst variable nothing goes wrong.
Getting Time Difference
in PHP Coding Help
Posted
Sorry but is there a way to GMT Offset the time object in your function?