Lomas 0 Newbie Poster

Did you hash the password? using MD5 or SHA1...

Lomas 0 Newbie Poster

azimuth0... :)

Thank you very much..... its working now...

i just found out if u turn on the "register global" setting for php5 ... the old codes will work as well....

again.... thanks.... really appreciate your help...

Lomas 0 Newbie Poster

It has to do with the magic variables setting. Try using $_REQUEST and $_REQUEST instead.

Thank you for replying.... really appreciate it...

i tried....

<?php
if ($_REQUEST['$id==1'] && $_REQUEST['$lang==1'])
{
    echo "hello";
}
?>

but its still not working...

how do i turn on the magic variables settings?

Lomas 0 Newbie Poster
<?php
if ($id == 1 && $lang == 1)
{
    echo "hello";
}
?>

hey guys i am working for my final year project. i have a problem. when i tried to run this url on my pc

http://localhost/filename?id=1&lang=1

it wouldn't work....

but when i tried this on my hosting, it will print out the word "hello".


my hosting is running php4....

and my pc is running php5...

does version matter?

Lomas 0 Newbie Poster

hi everybody, this is the small c++ program for selection sort using functions.

#include <iostream>

using namespace std;


void selectionSort(int numbers[], int array_size);

int main () {
    int number[4]= {20, 10, 40, 30};
    selectionSort(number,4);
    for (int i=0;i<4;i++){
   cout<<number[i]<<endl;
   }
    system("Pause");
    return 0;    
}



void selectionSort(int numbers[], int array_size)
{  
 int i, j;  
 int min, temp;  
 
 for (i = 0; i < array_size-1; i++)  
 {    
   min = i;    
   for (j = i+1; j < array_size; j++)    
   {      
    if (numbers[j] < numbers[min])        
      min = j;    
   }    
   temp = numbers[i];    
   numbers[i] = numbers[min];    
   numbers[min] = temp;  
 }
}

and i would like to change the same selection sort program using class, and following is the source code for selection sort with class.

#include <iostream>

using namespace std;

class Selectionsort {
      private:
              int i, j;
              int numbers[]; 
              int array_size;
              int min, temp;              
      public:
             
             void sort(int[], int);
             void print();
};
             

void Selectionsort::sort(int numbers[], int array_size) 
{   
    for (i = 0; i < array_size-1; i++)  
        {    
         min = i;    
         for (j = i+1; j < array_size; j++)    
             {      
             if (numbers[j] < numbers[min])        
             min = j;    
              }    
   temp = numbers[i];    
   numbers[i] = numbers[min];    
   numbers[min] = temp;  
 }
} ;

void Selectionsort::print()             // to print out the sorted numbers
{
     for (int i=0;i<4;i++){
     cout<<numbers[i]<<endl;
     }
};
      

int main () {    
    Selectionsort a[4] = {20,10,40,30}; //create an object
    a[4].sort(a,4);                     //sort
    a[4].print();                       //print out the sorted numbers
    system("Pause");
    return 0;    
}

unfortunately i got compilation errors, i have no idea how to correct them:rolleyes:
can someone help …