Skip to content

Instantly share code, notes, and snippets.

View shohan4556's full-sized avatar
💻
Making things that does not Exists !!

Shohanur Rahaman shohan4556

💻
Making things that does not Exists !!
View GitHub Profile
<?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 {
<?php
$con=mysql_connect('localhost','root','');
$sl=mysql_select_db('sign_up',$con);
?>
#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')"
@shohan4556
shohan4556 / codeshef.comlife-universe-everything
Created September 15, 2014 01:57
codeshef.comlife-universe-everything
#include <stdio.h>
int main() {
int i = 0;
while (scanf("%d\n", &i) > 0 && i != 42) {
printf("%d\n", i);
}
return 0;
}
@shohan4556
shohan4556 / initilize a two-D array and sum it
Created September 16, 2014 17:18
initilize a two-D array and sum it
#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++){
#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)
@shohan4556
shohan4556 / letter counter
Created September 19, 2014 02:40
letter counter
#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];
@shohan4556
shohan4556 / letter counter
Created September 19, 2014 02:41
letter counter
#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];
@shohan4556
shohan4556 / letter counter
Created September 19, 2014 02:41
letter counter
#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];
@shohan4556
shohan4556 / letter counter
Created September 19, 2014 02:42
letter counter
#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];