|
i am learner of php any body tell me
how to use calendar control in php using javascript.
anybody provide javascript code for calendar control and how i apply this control on my php application?
|
|
|
|
|
|
|
hi
i would like to know that i have a button save when i click on this button i want that all textboxs value store in database. how i can perform this task.
i am new user of php
please
|
|
|
|
|
I guess it's an AJAX question, Not PHP.
However you should use AJAX.
For that you should learn JAVASCRIPT.
But I suggest ,use Prototype[^] Framework.
It's easy.
|
|
|
|
|
You will have to have an AJAX function that updates the database. There are 3 components here-
1. AJAX script:
http://whatsaranjit.com/includes/grabData.js[^]
2. A button that calls AJAX:
<input type=button value=Update onClick="grabData('value','IDofDiv', page.php)'>
3. A user-facing page with a text field.
When the button is pushed, object.value (or whatever value) is passed to page.php as a $GET['q']. The PHP page should receive the $_GET['q'] as process a mysql_query() to update the database. The 'IDofDiv' is optional if you'd like the output of page.php to report content in between <div id=IDofDIv></div>. Good luck!
Ranjit Viswakumar
Professional Services Specialist
rviswakumar@hostmysite.com
HostMySite.com[^]
|
|
|
|
|
is it possible to call a php function with in onclick event?
if its possible how i can do this?
|
|
|
|
|
Yes, Definitive.
Well, when you're sending your form to server side, in the server side check whether the button define or not.
<?php
if (isset($_REQUEST['buttonName']))
func();
function func()
{
...
}
?>
|
|
|
|
|
but how to call a function through button onclick this function.
|
|
|
|
|
You'd have to use AJAX for that and make a request to the server, to a PHP page, (using JavaScript) process the request with your PHP script then return some data back to the page and do with it what you want with JavaScript.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
|
i just want to say www.igolfyoo.comwith PHP,but i don't now how to amend!
Can you help me?
Thanks!
|
|
|
|
|
Hello all
I want to learn php language for web developing, would you give me a good ebook or reference? I Googled my will but can't find anything useful although I want a good reference and I couldn't decide what was good for me.
T.I.A
While (true) { Human.isLearnable = true; }
|
|
|
|
|
|
|
|
hi dear pedram!
since i know you are an amateur i recommend you PHP 5 for Dummies this book start your PHP engine!good luck
|
|
|
|
|
Hello Hamid,
Can you give me a link of that eBook?
While (true) { Human.isLearnable = true; }
|
|
|
|
|
http://www.freebooksclub.net/php/278-php-5-for-dummies.html
|
|
|
|
|
I'd recommend this book as well as looking at http://www.php.net - that's how I learnt PHP
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
Hi,
I am working on c++ in a linux system ( Fedora core 4 ),
kernel version - 2.6.11-1.1369_FC4
gcc version - 4.0.0 20050519 ( Red Hat 4.0.0-8 )
In my code i am creating a vector to store pointers of type structure "SAMPLE_TABLE_STRUCT" ( size of this
structure is 36 bytes ). I create an instance of structure "SAMPLE_TABLE_STRUCT" using operator "new" and push back
into the vector,this is done inside a for loop for 204800 times. After i come out of for loop i observe the memory
consumed by the process using the command "pmap -d pid". The memory consumption increases by approximately 8 MB.
After this i delete all the contents of vector using "delete" operator. Now if i observe the memory consumed by the
process ( using "pmap -d pid" command ) it shows no reduction in the memory even after deallocating the memory in
the code.
But it shows memory reduction after deleting vector contents if i store the "char *" elements into the vector
instead of "SAMPLE_TABLE_STRUCT *" elements.
Am not able to figure it out why it does not show memory reduction ( after deleting vector contents ) in case of
vector of type "SAMPLE_TABLE_STRUCT *" whereas it shows reduction in memory for vector of "char *" type elements(
after deleting vector contents )...?
Can anyone please help me out here...?
Here is the piece of code where am facing the problem -
[CODE]
#define ALTERNATE
#define MAX_STRING_VEC_SIZE 134
#define MAX_STRUCT_VEC_SIZE 1024*200//134
#define MAX_MEM_SIZE 1024*50
/*vector of char * type*/
void Function()
{
std::vector< char * > v_pData;
#ifdef ALTERNATE
v_pData.resize( MAX_STRING_VEC_SIZE, NULL );
#endif //ALTERNATE
bool bFlag = true;
while( bFlag );
//Allocate Memory
for( int nInd = 0 ; nInd < MAX_STRING_VEC_SIZE; nInd++ )
{
char * pData = new char [MAX_MEM_SIZE];
memset( pData, 0, MAX_MEM_SIZE );
#ifdef ALTERNATE
v_pData[nInd] = pData;
#else //ALTERNATE
v_pData.push_back( pData );
#endif //#endif //ALTERNATE
}
bFlag = true;
while( bFlag );
//Release all the Memory
for( int nInd = 0 ; nInd < MAX_STRING_VEC_SIZE; nInd++ )
{
delete [] v_pData[nInd];
}
v_pData.clear();
}
/*vector of SAMPLE_TABLE_STRUCT * type*/
void Function1()
{
std::vector< SAMPLE_TABLE_STRUCT * > v_pData;
#ifdef ALTERNATE
v_pData.resize( MAX_STRUCT_VEC_SIZE, NULL );
#endif //ALTERNATE
//Allocate Memory
for( int nInd = 0 ; nInd < MAX_STRUCT_VEC_SIZE; nInd++ )
{
SAMPLE_TABLE_STRUCT * pData = new SAMPLE_TABLE_STRUCT;
#ifdef ALTERNATE
v_pData[nInd] = pData;
#else //ALTERNATE
v_pData.push_back( pData );
#endif //#endif //ALTERNATE
}
//Release all the Memory
for( int nInd = 0 ; nInd < MAX_STRUCT_VEC_SIZE; nInd++ )
{
delete v_pData[nInd];
v_pData[nInd] = NULL;
}
v_pData.clear();
}
[/CODE]
|
|
|
|
|
i need some help and direction on how to go about creating a unix shell in c++. Any pointers? help?
|
|
|
|
|
Basically you need to extensively learn system calls using C. Also you would need to learn features like forking processes (typically used in pipes) etc. You also should figure out I/O Streaming support. When you are done with this, you can design the shell and depending on commands typed, fork processes, deal with I/O, make system calls etc
-------------------------------------------
It's code that drives you - Shyam
|
|
|
|
|
For instance, I've got this form:
<html>
<head>
</head>
<body>
<form name="f_prof" id="f_prof" action="chooseOption.php" method="post">
Choose an Option:
<select name="selectedOption" id="selectedOption">
<option value="0">Option 1</option>
<option value="1">Option 2</option>
<option value="2">Option 3</option>
<option value="3">Option 4</option>
</select>
<input type="submit" value="Send" name="ok" id="ok">
</form>
</body>
</html>
And choseOption.php is like this:
<?php
echo ("The option selected was: '$selectedOption'");
?>
The form work fine but when I choose an option and submit it I get this
The option selected was:''
It is supposed that variable $selectedOption is created implicitly but it does not print its value. As you can see, I'm starting in php and web programing, so I'm kind of lost.
Any help would be appreciated and excuse my english.
Regards
Iván Cruz
|
|
|
|
|
blackhattrick wrote: echo ("The option selected was: '$selectedOption'");
You can't get values from forms just like that.
You need to get the value via the POST method:
$selectedOption = $_POST['selectedOption'];
echo ("The option selected was: '$selectedOption'");
?>
That should work.
Kristian Sixhoej
"Failure is not an option" - Gene Kranz
|
|
|
|