This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
session_start(); //starts the session | |
session_unset(); // removes all the variable in the session | |
session_destroy(); //destroy the session | |
if (!$_SESSION['email']) { | |
echo "successfully Loged out <br/>"; | |
# code... | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$con=mysql_connect('localhost','root',''); | |
$sl=mysql_select_db('sign_up',$con); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Run all the code in your mysql Database | |
CREATE DATABASE SIGN_UP; | |
create table sign_up(first_name varchar(15) NOT NULL,last_name varchar(15) NOT NULL,email varchar(40) NOT NULL, | |
password varchar(12) NOT NULL,PRIMARY KEY(email)) | |
sql="INSERT INTO sign_up (first_name,last_name,email,password) VALUES ('$fname','$lname','$email','$pass')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() { | |
int i = 0; | |
while (scanf("%d\n", &i) > 0 && i != 42) { | |
printf("%d\n", i); | |
} | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void main() | |
{ | |
int i,j,array[4][4],sum=0; | |
for(i=0;i<4;i++){ | |
for(j=0;j<4;j++){ | |
array[i][j]=j; // initializing array | |
} | |
} // end of initialoze array | |
for(i=0;i<4;i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() // project euler problem # 5 | |
{ | |
int i=1; | |
while(1) | |
{ | |
if(i%11==0 && i%12==0 && i%13==0 | |
&& i%14==0 && i%15==0 && i%16==0 | |
&& i%17==0 && i%18==0 && i%19==0 | |
&& i%20==0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
char str[100]; | |
int i=0,nl=0; | |
gets(str); // it takes input with space | |
while(str[i] !='\0') // null termination character, it marks the the end of string | |
{ | |
char ch= str[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
char str[100]; | |
int i=0,nl=0; | |
gets(str); // it takes input with space | |
while(str[i] !='\0') // null termination character, it marks the the end of string | |
{ | |
char ch= str[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
char str[100]; | |
int i=0,nl=0; | |
gets(str); // it takes input with space | |
while(str[i] !='\0') // null termination character, it marks the the end of string | |
{ | |
char ch= str[i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main() | |
{ | |
char str[100]; | |
int i=0,nl=0; | |
gets(str); // it takes input with space | |
while(str[i] !='\0') // null termination character, it marks the the end of string | |
{ | |
char ch= str[i]; |