Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~15.0K People Reached
Favorite Tags

18 Posted Topics

Member Avatar for BigFormat

Hello, I've written down a small JS function 'checkForm()' to validate the input in a form and alerting, before actually sending data to the PHP server-side script. In my form, in addition to common input text fields I've got two buttons: the first called "ADD" to submit data and "CANCEL" …

Member Avatar for BigFormat
0
185
Member Avatar for BigFormat

Hi all, I'd like to filter an input string with a list of commas separated numeric ids to understand if it matches the pattern (only digits and commas allowed, i.e. "112,5,16,4578,ecc"). I'm trying to perform a regular expression match using preg_match. [code=PHP] $ids_list = '112,5,16,4578'; if (preg_match('/[0-9,]*/', $ids_list)) echo'OK!'; else …

Member Avatar for BigFormat
0
170
Member Avatar for BigFormat

Hi all, I would like to perform a conditional get of a file using PHP and cURL. How can I detect 304 code sent via HTTP headers and avoid to download the entire file?

Member Avatar for BigFormat
0
60
Member Avatar for mrcniceguy

I remember to have read somewhere that it's possible to set Sessions'cookie timeout, in order to expire for example after a month instead of on browser closing... How is it possible?

Member Avatar for somedude3488
0
136
Member Avatar for BigFormat

I'd like to redirect the user to another page, i.e. after a login check. I'm used to doing this via header location directive, it's all ok, but, if I'd like to print a message and redirect the user in 2/3 seconds, like on this forum when you login? Is it …

Member Avatar for BigFormat
0
5K
Member Avatar for BigFormat

I need to obtain current date formatted this way in PHP: Sun, 26 May 2005 19:32:54 GMT Is there a specific function or I've got to create it myself?

Member Avatar for ShawnCplus
0
59
Member Avatar for BigFormat

It's not a lot more than curiosity, which is the difference between <br> and <br /> ? I see both of them widely used and abused, are they completely interchangeable ?

Member Avatar for BigFormat
0
93
Member Avatar for nish123

[QUOTE=Josh Connerty;881447]Basicly the logic is like this, :P You take the time stamp when they log in, store this in two fields last log in time and last movement. Every page they visit you need to runa query to update their last move to the current time stamp. (...) [/QUOTE] …

Member Avatar for Josh Connerty
0
3K
Member Avatar for BigFormat

Hello, I've got to find on a small lan (< 200 hosts) the host (or better one of the hosts) which has in its [I]registry[/I] a specific public name bound. My first idea was to write a loop in which for each potential host of the lan I perform a …

0
53
Member Avatar for BigFormat

I need to list the files in my current directory and have them packed into an array of chars, in Linux. I use system("ls > temp_file"); to write them one per row in a temp file, and then I copy from this file to my string. Is there a more …

Member Avatar for Salem
0
66
Member Avatar for BigFormat

Hello, I need to create some dirs (one for each user), taking the dir name from a given string. I managed to do this with the following code: [CODE=C] DIR *dir_ptr; char *target_dir; target_dir = malloc(32*sizeof(char)); for(all users) { /* Set username for current user */ target_dir[0] = '\0'; strcat(target_dir, …

Member Avatar for Salem
0
104
Member Avatar for BigFormat

Hello, I've to build a database of students in a certain school in which each student has a list of her/his passed exams along with the grade gotten. I have 3 structs and I need an advice on how to carry out memory allocation, eg. when I add a student. …

Member Avatar for Clockowl
0
3K
Member Avatar for p3_tib2001

[QUOTE=varsha0702;608031]Secondly There can be a change that the header file containing the definition of structures , has been included more than once in a file.[/QUOTE] Maybe, to avoid the problem I suggest using ifndef directive in headers containing structs.

Member Avatar for p3_tib2001
0
169
Member Avatar for BigFormat

I have to pass a string to a function that strcats something to it, in K&R I read to pass a pointer to it, but I don't know where to allocate buffer... Is there a difference betw passing an empty string or not? My printf starts with some strange symbols, …

Member Avatar for BigFormat
0
2K
Member Avatar for BigFormat

Hi all, I've done this prog to get the last token in a string es: /dir1/dir2/file.txt must return --> file.txt I get several errors on assignments, what's wrong with it? many thanks [CODE] int main() { char *path; char *filename; path = (char*) malloc(sizeof(char) * 64); strcpy(path, "/dir1/dir2/file.txt"); filename = …

Member Avatar for BigFormat
0
1K
Member Avatar for BigFormat

Hi guys, I've to read a txt file and produce a statistic of each alphabetic char occurrence. I'm approaching this task reading char by char until EOF and using an int array to hold the number of occurrences of each character read so far! So that's my solution: [code] int …

Member Avatar for Salem
0
435
Member Avatar for BigFormat

Hi guys, I've got troubles with a conversion. My function: void stringFormat (char *input, int nums) receives a string like this: "name;3,45,5,6,77;" and a number indicating how many numbers in the String (in this case 5) I've got to tokenize the string in order to obtain: 1) a string named …

Member Avatar for BigFormat
0
158
Member Avatar for BigFormat

Hi guys, congrats for this wonderful site, I've found it very helpful for my programmation skills, in more than one case.. Keep going this way :)

Member Avatar for jasimp
0
36

The End.