[PHP] Job Opportunities in Web Design company

2006-07-01 Thread Ahmed Abdel-Aliem

Safari Studio Inc. is looking for qualified
designers/developers for a full time/part time
position. This is position is available for
designers/developers that want to work in a company
that is growing.

click here to fill in the application form
http://www.safaristudio.net/hr/

Job Number 1 : PHP web developer
Job Type : Full Time

Job Description:

We need an experienced PHP/MySQL developer (based
anywhere) for long term work with our growing company.
The person hired will work for us Full time.

Qualifications
* Intermediate level PHP/MySQL programmer.
* Have experience in working with e-commerce.
* Fluent English is required.
* XHTML/CSS layout and design.
* Solid references and examples of previous work.
* Ability to come up with novel solutions.
* Fast learner. Fast worker.
* Dedicated.
* Easy to talk to, with a positive attitude.

Job Description

* Design and code a wide range of PHP and PHP/MySQL
applications.
* Modify a range of existing PHP and PHP/MySQL
applications.
* Full time commitment to our projects. Must be
reliable, trust-worthy and have a high level of
integrity.
* Must be available at all times during your shift on
Instant Messenger .
* Install/upgrade PHP applications.
* Must be able to multi-task, work independently, and
communicate.
We need an experienced PHP/MySQL developer (based
anywhere) for long term work with our growing company.
The person hired will work remotely for us on a
project basis. Hourly rate is nrgotiable.

click here to fill in the application form
http://www.safaristudio.net/hr/

Job Number 2 : Graphic/Web Designer
Job Type : Full Time

We want to hire multiple Designers who are experts
with the following:
Flash 8
Adobe Photoshop
Slicing Design in HTML

We are looking for someone that can prove themselves
through working project based. You will be graded on
being reliable, efficient and on time.

Multiple Designers will be selected. Pay will be great
as long as you can prove yourself to be the cream of
the crop. Individuals who demonstrate excellent
quality of work will be hired as full time.

Requirements:
- Expert level knowledge of the above mentioned
technologies
- Ability to develop an application based on a
functional description
- Available via an instant messenger MSN/Yahoo/etc.
- A reliable, high-speed DSL. internet connection
- Good English communication skills, both verbal and
grammar
- A telephone or Mobile
- Willingness to give frequent updates on work being
done and maintain a consistent work schedule
- Good organizational skills and work habits
- Resume and work samples.

click here to fill in the application form
http://www.safaristudio.net/hr/

Job Number 3: Marketing Representative
Job Type : Full Time

Requirements:
- fair level knowledge of the web design technologies
- Good Looking
- Negotiation Skills
- Good English communication skills, both verbal and
grammar
- A telephone or Mobile
- Good organizational skills and work habits

Please DO NOT apply if you:
- Do not meet any of the above requirements
- Are a company or group of individuals, we will only
hire individuals to perform contract work
- Are a recruiter, we will only hire individuals with
whom we can work with directly
click here to fill in the application form
http://www.safaristudio.net/hr/

SafariStudio Inc.
HR Department
http://www.safaristudio.net



--
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789


[PHP] remove keys from array

2006-06-11 Thread Ahmed Abdel-Aliem

hi all
when i have array in the form of :
Array ( [0] => 2 [ID] => 2 [1] => asdasd [CategoryName] => asdasd ) )
how can i make it in the form of :
Array ( [ID] => 2 [CategoryName] => asdasd ) )

can anyone help me with that plz ?

--
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789


[PHP] Contact List Grabber

2006-03-05 Thread Ahmed Abdel-Aliem
Hi
i would like to make a script to import contact list from msn, yahoo
and gmail instant messenger.
any ideas or tutorial on how to do that.
any help will be appreciated
thanks in advance

--
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] printing keys and values of array

2006-01-05 Thread Ahmed Abdel-Aliem
Hi
i need some help with printing an array, i would like to print the
keys and the values of them
example :

if i have an array like that


[EXTENDED] => Array
(
[RTCode] => CASE395
[ManuPartNum] => 1BRA1ACFB
[Colour] => WHITE
[Compatibility] => (ATX/E ATX)
[PowerSupply] => YES
[PowerSupplySize] => redundant 337W2
[ExtDriveBays] => 3 x 5.25 1 x 3.5
[IntDriveBays] => 6 x 5.25
[USBPortsFront] => no
[FirewirePortsFront] => no
[AudioPortsFront] => no
[CaseFan] => 8cm FAN2  12cm FAN1  P/S2
[NumCaseFans] => 5
[FreeCaseFanPoints] => No
[Material] => Stainless steel
[Window] => No
[Packaging] => Retail
[Warranty] => 24 months for the PSU
[BoxContents] => Manual
[CartonHeight] => 735mm
[CartonWidth] => 285mm
[CartonDepth] => 585mm
[ItemsPerCarton] => 1
[CartonWeight] => 1.6kg
[EAN] =>
[BoxWeight] =>
[ItemHeight] =>
[ItemWidth] =>
[ItemDepth] =>
)

and i like to print it this way

RTCode:CASE395
ManuPartNum] :1BRA1ACFB
Colour] :WHITE
Compatibility :(ATX/E ATX)
PowerSupply :YES
PowerSupplySize:redundant 337W2
ExtDriveBays:3 x 5.25 1 x 3.5
IntDriveBays:6 x 5.25
USBPortsFront:no
FirewirePortsFront:no
AudioPortsFront:no
CaseFan:8cm FAN2  12cm FAN1  P/S2
NumCaseFans:5
FreeCaseFanPoints] => No
Material :Stainless steel
Window :No
Packaging:Retail
Warranty:24 months for the PSU
BoxContents:Manual
CartonHeight:735mm
CartonWidth:285mm
CartonDepth:585mm
ItemsPerCarton:1
CartonWeight:1.6kg
EAN:
BoxWeight:
ItemHeight:
ItemWidth:
ItemDepth:

can anyone tell me plz how to do that ?
any help would be appreciated

thanks in advance

--
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] detecting file size

2005-12-12 Thread Ahmed Abdel-Aliem
hi
i am making a form to upload files to server
i know i can detect the file size after being uploaded, but i do want
to detect the file after it is being uploaded to the server.
is there anyway i can do this ?

any help would be appreciated,
thanks in advance.

--
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] array merge problem

2005-09-01 Thread Ahmed Abdel-Aliem
i have the array with the following structure :

Array
(
[19] => 20.00
[25] => 20.00
[7] => 30.00
[17] => 30.00
)

when i merge a field to it using array_merge
it returns that :

Array
(
[0] => 20.00
[1] => 20.00
[2] => 30.00
[3] => 30.00
[4] => 200.00
)

how can i merge the field without losing the original keys ?
can anyone help me with that plz
thanks in advance

-- 
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] String format problem

2005-08-31 Thread Ahmed Abdel-Aliem
hi
i have a problem when i am formating a string
the problem is it converts the \n in the string to a new line
here is the code

http://localhost/bank/admin/store";;

//$doc = str_replace ($Replace, $with, $Text);
$doc = str_replace( '\\', '/', str_replace( $Replace, $with, $Text ) );

echo $doc;

//i need $Doc to look like this
http://localhost/bank/admin/store/nodirectory/sub
//but it outputs http://localhost/bank/admin/store odirectory/sub


?>
can any one help me with that plz
thanks in advance

-- 
Ahmed Abdel-Aliem
Web Developer
www.SafariStudio.net
+20101108551
registered Linux user number 382789

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Ahmed Abdel-Aliem has invited you to try Google Talk.

2005-08-27 Thread Ahmed Abdel-Aliem
I've been using Google Talk and thought you might like to try it out.
We can use it to call each other for free over the internet. Here's an
invitation to download Google Talk.  Give it a try!

-------

Ahmed Abdel-Aliem has invited you to sign up for Google Talk so you can
talk to each other for free over your computers. Signing up also gives 
you Gmail, a free Google email account with over 2,000 megabytes 
of storage.

To accept this invitation and get Google Talk and Gmail, visit:
http://mail.google.com/mail/a-353c367f8f-9c28f4a6d8-e736913ada

If you already have a Gmail account, please visit:
http://mail.google.com/mail/b-353c367f8f-9c28f4a6d8-d3c240b87504c300

Google Talk is a downloadable Windows application that lets you send 
instant messages to your friends and make free phone calls over an 
internet connection. Google Talk offers excellent voice quality and 
works with any computer speaker and microphone. 

Gmail is Google's free email service, offering lots of free storage, 
powerful spam protection, built-in search for finding your messages, 
and a helpful way of organizing email into "conversations." And there 
are no pop-up ads or untargeted banners - just text ads and related 
information that are relevant to the content of your messages.

Once you sign up, we'll notify Ahmed Abdel-Aliem of your new Gmail address 
and add you to each others' Friends lists so you can start talking 
right away. 

Gmail and Google Talk are still in beta. We're working hard to add 
new features and make improvements, so we might also ask for your 
comments and suggestions periodically. We appreciate your help in 
making our products even better! 

Thanks,

The Gmail and Google Talk Teams


To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/benefits.html
http://www.google.com/talk/about.html 

(If clicking the URLs in this message does not work, copy and paste 
them into the address bar of your browser).

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] upload file problem

2005-07-09 Thread Ahmed Abdel-Aliem
Hi
i have a problem with a code to upload files on server
here is the code 

$f =& $HTTP_POST_FILES['News_Pic'];

$dst_file_name = generateUniqueId();

$arr = split("\.",$f['name']);

$f['name'] = $dst_file_name;

$f['name'] .= ".".$arr[count($arr)-1];

$dest_dir = 'main/pictures';

$dest = $dest_dir . '/' .$f['name'];

$r = move_uploaded_file($f['tmp_name'], $dest);

$News_Pic = $f['name'];
chmod($dest, 777);

after uploading a file i check the folder and i find nothing uploaded
and when i check the MySQL Table for the filed of the name of the
picture i find this
ef26fc32a2855a4edb6ef389b8b621af.
it should be that random number followed by the extension, for example :
ef26fc32a2855a4edb6ef389b8b621af.jpg
but this deosn't happen and the file is not uploaded
can anyone help me with this plz ?
-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551
registered Linux user number 382789

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] SWF duration time

2005-05-21 Thread Ahmed Abdel-Aliem
hi,

i have a question, 

is there a function to detect SWF files play duration ??


any help would be appreciated

thanks,


-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551
registered Linux user number 382789

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] setting condition problem

2005-05-02 Thread Ahmed Abdel-Aliem
hi all
i have a query that grabs records from the database, it works fine,
but i have a problem with  acondition i want to set for it
the variable $Record[Relate] has 1 of 2 values, "self" or "share"
what i wanna do is that when the variable has the value "share" it do
check the records grabbed and get the other records that has the value
share and $Record[Title] the same and display them once,
i don't know how to start doing this,
can anyone guide me or tell me how to do it 
thanks in advance

here is the query 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Can't Delete File Using Unlink

2005-04-11 Thread Ahmed Abdel-Aliem
On Apr 11, 2005 8:39 PM, Ben Ramsey <[EMAIL PROTECTED]> wrote:
> Ahmed Abdel-Aliem wrote:
> > On Apr 11, 2005 8:28 PM, Ben Ramsey <[EMAIL PROTECTED]> wrote:
> >
> >>Ahmed Abdel-Aliem wrote:
> >>
> >>>i have a problem with deleting files, i use windows XP and installed
> >>>on it apache server & PHP 5.1
> >>>i use unlink($file) to delete files but it doesn't work while it works
> >>>fine on my webhosting which is on linux machine
> >>>is there another function to use to delete files under windows instead
> >>>of link ??
> >>
> >>The webserver needs to have permission to modify the file that you are
> >>trying to delete. Check the file and directory permissions by
> >>right-clicking the directory and going to properties. You will probably
> >>need to give the user that controls apache either "full" or "modify"
> >>permissions to the Web directory.
> >>
> >>In general, permission settings under Windows suck.
> >>
> >
> >
> >
> > i tried that, when a file is being uploaded it becomes read-only, so
> > it can't be deleted, how can i make it not read-only by default ?
> 
> Can you post the code you're using to upload and save the file to the
> Web server?
> 

this is the function i am using to upload the file 

function UploadFile($File) {

$this->File = $File;

$this->File_Name = strtolower($this->File['name']);

$SQL_Query = mysql_query("SELECT * FROM files WHERE file_name =
'$this->File_Name'");
$Records = mysql_num_rows($SQL_Query);



$arr = split("\.",$this->File['name']);

if($Records > 0){


$dst_file_name = $this->GenerateUniqueID();

$this->File['name'] =
$this->File['name'].$dst_file_name[1].$dst_file_name[5];
$this->File['name'] .= ".".$arr[count($arr)-1];

}
$this->File_Ext = $arr[count($arr)-1];
    
        $dest_dir = 'files';
$dest = $dest_dir . '/' .$this->File['name'];
$r = move_uploaded_file($this->File['tmp_name'], $dest);
$this->File_Name = $this->File['name'];
chmod("files/".$this->File_Name, 777);  

}


the partition the server on is Fat32

hop i will find a way to solve this, thanks
-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551
registered Linux user number 382789

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Can't Delete File Using Unlink

2005-04-11 Thread Ahmed Abdel-Aliem
On Apr 11, 2005 8:28 PM, Ben Ramsey <[EMAIL PROTECTED]> wrote:
> Ahmed Abdel-Aliem wrote:
> > i have a problem with deleting files, i use windows XP and installed
> > on it apache server & PHP 5.1
> > i use unlink($file) to delete files but it doesn't work while it works
> > fine on my webhosting which is on linux machine
> > is there another function to use to delete files under windows instead
> > of link ??
> 
> The webserver needs to have permission to modify the file that you are
> trying to delete. Check the file and directory permissions by
> right-clicking the directory and going to properties. You will probably
> need to give the user that controls apache either "full" or "modify"
> permissions to the Web directory.
> 
> In general, permission settings under Windows suck.
> 


i tried that, when a file is being uploaded it becomes read-only, so
it can't be deleted, how can i make it not read-only by default ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Can't Delete File Using Unlink

2005-04-11 Thread Ahmed Abdel-Aliem
Hi
i have a problem with deleting files, i use windows XP and installed
on it apache server & PHP 5.1
i use unlink($file) to delete files but it doesn't work while it works
fine on my webhosting which is on linux machine
is there another function to use to delete files under windows instead
of link ??

any help would be appreciated.
thanks in advance

-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551
registered Linux user number 382789

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem calling function within a class

2005-03-18 Thread Ahmed Abdel-Aliem
hi

i am new to classes and i have a problem with a class i wrote

here is the class

---
class Company {


var $Company_Name;
var $Company_Referrer_Table;
var $Company_Visitor_Table;
var $Company_ID;
var $Message;
var $File;
var $FileName;
var $Record_Data;


function CompanyInfo (){



$SQL_Query = mysql_query("SELECT * FROM company_list WHERE
Company_ID = $this->Company_ID");
$Record = mysql_fetch_array($SQL_Query);

$this->Company_ID = $Record['Company_ID'];
$this->Company_Name = $Record['Company_Name'];  
$this->Company_Referrer_Table = 
$Record['Company_Referrer_Table'];
$this->Company_Visitor_Table = $Record['Company_Visitor_Table'];

return $this->Company_Referrer_Table;
return $this->Company_Visitor_Table;

}   


function GenerateUniqueID(){

return md5(uniqid(mt_rand(),TRUE));

}


function UploadFile($File) {

$this->File = $File;
$dst_file_name = $this->GenerateUniqueID();
$arr = split("\.",$this->File['name']);
$this->File['name'] = $dst_file_name;
$this->File['name'] .= ".".$arr[count($arr)-1];
$dest_dir = 'temp';
$dest = $dest_dir . '/' .$this->File['name'];
$r = move_uploaded_file($this->File['tmp_name'], $dest);
$this->FileName = $this->File['name'];
chmod("temp/".$this->FileName, 777);


}

function TakeData($File, $Company_ID, $Destination) {

$this->Company_ID = $Company_ID;

$this->CompanyInfo();



if ($Destination == "Referrer"){

$SQL_Query = "INSERT INTO $this->Company_Referrer_Table 
( Record_ID
, Record_Data ) VALUES ( '', '$this->Record_Data')";

}elseif ($Destination == "Visitor"){

$SQL_Query = "INSERT INTO $this->Company_Visitor_Table 
( Record_ID
, Record_Data ) VALUES ( '', '$this->Record_Data')";

}

$this->UploadFile($File);

$fh = fopen("temp/".$this->FileName, "r");
while (! feof($fh)) : $this->Record_Data = fgets($fh, 4096);
mysql_query($SQL_Query)or die("Error In Importing Records To 
The Database");
endwhile;
fclose($fh);

$this->Message = "Date Imported Successfully";
return $this->Message; 

}



}

---

the problem occurs when i call the function TakeDate 

i use this code to call it 

$Company = new Company();
$File =& $HTTP_POST_FILES['FileToUpload'];
$Company->TakeData($File, $Company_ID, $Destination);
$Message = $Company->Message;

the error i get is "Error In Importing Records To The Database" which
i defined as the error of mysql in the function.

i checked everything and found that the problem happens because i
can't retireve the values of
$this->Company_Referrer_Table and $this->Company_Visitor_Table by
calling the function CompanyInfo
from the function TakeData



can anyone advise me with the right way to call the CompanyInfo
function from the TakeData and get the values correctly?




-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551
registered Linux user number 382789

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Wierd PHP Problem

2005-02-23 Thread Ahmed Abdel-Aliem
Hi 
i use the following code as a login page for a restricted area
it works fine on some servers when i enter the right username and password
but it doesn't work on some servers when i enter the right username
and password, and returns wrong username and password
can any one tell me what possible reasons could make this code works
on some servers and doesn't on other servers ?

here is the code :
Please enter ALL of the
information! ";
include 'login_form.html'; 
include 'footer.html'; 
exit(); 
}
$sql = mysql_query("SELECT * FROM users WHERE username='$username'
AND password='$password'");
$login_check = mysql_num_rows($sql); 
if($login_check > 0){
session_register('user_id'); 
$_SESSION['user_id'] = $user_id;  
while($row = mysql_fetch_array($sql)){ 
foreach( $row AS $key => $val ){ 
$$key = stripslashes( $val ); 
} 
session_register('username'); 
$_SESSION['username'] = $username; 
header("Location: login_success.php"); 
 }
}else{
include 'header.html';
echo "You could not be logged in! 
Either
the username and password do not match!
        Please try again!"; 
include 'login_form.html'; 
include 'footer.html'; 
}
?>

-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] weird mail function problem

2005-02-21 Thread Ahmed Abdel-Aliem
hi
i use this code to send email from mysite
but when it sends to some accounts it repeats the body part twice in
the same email while to other accounts it sends the body one time only
can anyone help in that plz ?


if ($email_to != "") {
$to = array();
$to = explode (",", $email_to);
$to_mum = count($email_to);
for ($i=0; $i<$to_mum ; $i++){
$to_email = $to[$i];
$subject = $email_subject;
$body .= $HTTP_POST_VARS['message'];
$body .= "\n---\n";
$body .= "Article Name :";
$body .= "\n---\n";
$body .= $Article_Name;
$body .= "\n---\n\n";   
$body .= "\nStory :\n\n";
$body .= $TheStory; 
$body .= "\n\n\n---\n";
$body .= "Sent By: " . $HTTP_POST_VARS['email_address'] 
. "\n";
$header = "From: " . $HTTP_POST_VARS['email_address'] . 
" <" .
$HTTP_POST_VARS['email_address'] . ">\n";
$header .= "Reply-To: " . 
$HTTP_POST_VARS['email_address'] . " <" .
$HTTP_POST_VARS['email_address'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
mail($to_email, $subject, $body, $header);

-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] skip file_get_contents

2005-01-23 Thread Ahmed Abdel-Aliem
hi, i have a script that parses data from xml document
my problem is sometimes i get error when getting file content from xml
file fails
so how can u make the script ignore that part when it fails to pull
the data from the xml file.

here is the script :

$xp = xml_parser_create();
xml_set_character_data_handler($xp,'h_char');
xml_set_element_handler($xp,'h_estart','h_eend');
$listing = 0;
$found_listings = array();
$tag_name = '';

xml_parse($xp,file_get_contents("http://someXMLdocument.xml";));

function h_char($xp,$cdata) {
global $listing, $tag_name;
if (is_array($listing) and $tag_name) {
$listing[$tag_name] .=
str_replace(''',"'",str_replace('&','&',str_replace('\\$','$',$cdata)));
}
return true;
}

function h_estart($xp,$name,$attr) {
global $listing, $tag_name;
if ($name == 'SITE') {
$listing = array();
}
else {
$tag_name = strtolower($name);
}
return true;
}

function h_eend($xp,$name) {
global $listing, $tag_name, $found_listings;
if ($name == 'SITE') {
$found_listings[] = $listing;
$listing = null;
    }
    $tag_name = '';
return true;
}

echo "hi, i am xml data"
xml_parser_free($xp);

can anyone help me with that please?
-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] array problem

2005-01-21 Thread Ahmed Abdel-Aliem
hi
if i have an array 

$listing1 = array(array('title'=>'yahoo', 'redirect'=>'www.yahoo.com',
'info'=>'yahoo website'), array(title=>'msn',
'redirect'=>'www.msn.com', 'info=>'msn website'));

$listing2 = array(array('name'=>'lycos', 'link'=>'www.lycos.com',
'description'=>'lycos website'), array(name=>'me2resh',
'link'=>'www.me2resh.com', 'description'=>'me2resh website'));

how can i group them together into one array to be :

$listing3 = array(array('header'=>'lycos', 'url'=>'www.lycos.com',
'information'=>'lycos website'), array(header=>'me2resh',
'url'=>'www.me2resh.com', 'information'=>'me2resh website'),
array('header'=>'lycos', 'url'=>'www.lycos.com', 'information'=>'lycos
website'), array(header=>'me2resh', 'url'=>'www.me2resh.com',
'information'=>'me2resh website'));

and then how can i sort them by the value of information for example
can anyone help me please with this ?


Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com
0101108551

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] oscommerce

2005-01-04 Thread Ahmed Abdel-Aliem
hi
i have a site using oscommerce script, 
i made some modifications but i am stuck with a variable there.
i can't describe it here cause no one will understand what i mean, so
is there any one familiar with oscommerce , so he can guide me, it
won't take more than 5 minutes
if yes plz add me to msn messenger with [EMAIL PROTECTED] or yahoo msn
with ID me2resh

thanks

-- 
Ahmed Abdel-Aliem
Web Developer
www.ApexScript.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] first letter

2004-12-20 Thread Ahmed Abdel-Aliem
hi
if i have for example this variable

$name = "John";

how can i echo the first letter only so the result on the browser will be "J"

can anyone help ?
 


-- 
Ahmed Abdel-Aliem
www.ApexScript.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] header information problem

2004-12-18 Thread Ahmed Abdel-Aliem
Dear Groups members.

i am making a user protected page, the script works excellent on my
local server, but online it gives me this error :

Warning: Cannot modify header information - headers already sent by
(output started at
/home/me2resh/public_html/apex/upload/header.html:10) in
/home/me2resh/public_html/apex/upload/upload.php on line 33

the script of the page is 

You Got To This Page By Mistake";
include 'footer.html';
}else{
session_start();  
include 'db.php'; 
include 'header.html';
$username = $_POST['username']; 
$password = $_POST['password']; 
if((!$username) || (!$password)){ 
echo "Please enter ALL of the information! "; 
include 'login_form.html'; 
include 'footer.html'; 
exit(); 
}
$sql = mysql_query("SELECT * FROM user WHERE User_Login='$username'
AND User_Password='$password'");
$login_check = mysql_num_rows($sql); 
if($login_check > 0){
session_register('ID'); 
$_SESSION['ID'] = $ID;  
while($row = mysql_fetch_array($sql)){ 
foreach( $row AS $key => $val ){ 
$$key = stripslashes( $val ); 
} 
session_register('User_First_Name'); 
$_SESSION['User_First_Name'] = $User_First_Name; 
session_register('User_Last_Name'); 
$_SESSION['User_Last_Name'] = $User_Last_Name;   
session_register('User_ID'); 
$_SESSION['User_ID'] = $User_ID; 
header("Location: login_success.php"); 
}
}else{
include 'header.html';
echo "You could not be logged in! Either the username and 
password
do not match!
Please try again!"; 
include 'login_form.html'; 
include 'footer.html'; 
}
} 
?>


Can anyone help me with that problem please ?

-- 
Ahmed Abdel-Aliem
www.ApexScript.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problem with array

2004-12-15 Thread Ahmed Abdel-Aliem
Hi
i am retrieving records from database and putting each row in a array
here is the code 
@ $db = mysql_connect ($server, $user, $pass);
mysql_select_db($database);
$query = "SELECT Game_ID FROM games WHERE Game_Category='$Game_Category'";
$result= mysql_query($query);
$total_numbers = mysql_num_rows($result);
$startingID=$_GET['startingID'];
$startingID = ($startingID) ? $startingID : 0; //if rec is passed in, use it,
$row = array();
$test_tr = mysql_query("select * from games WHERE
Game_Category='$Game_Category' order by Game_ID desc LIMIT
$startingID,
$items_numbers_list");
$num = mysql_num_rows($test_tr);
while ($record=mysql_fetch_array($test_tr)){
$record[Game_ID] = stripslashes($record[Game_ID]);
$record[Game_Picture_Small] = stripslashes($record[Game_Picture_Small]);
$record[Game_Name] = stripslashes($record[Game_Name]);
$record[Game_Title] = stripslashes($record[Game_Title]);
$record[Game_Description] = stripslashes($record[Game_Description]);
$record[Game_Full_Story] = stripslashes($record[Game_Full_Story]);
$record[Game_Screen_Shot_1] = stripslashes($record[Game_Screen_Shot_1]);
$record[Game_Screen_Shot_2] = stripslashes($record[Game_Screen_Shot_2]);
$record[Game_Screen_Shot_3] = stripslashes($record[Game_Screen_Shot_3]);
$record[Game_Status] = stripslashes($record[Game_Status]);
$record[Game_Play_Score] = stripslashes($record[Game_Play_Score]);
$record[Game_Category] = stripslashes($record[Game_Category]);
$Game_Esrb_Rating = intval($record[Game_Esrb_Rating]);
echo $record[Game_Esrb_Rating];
if($Game_Esrb_Rating < 1){ 
$Esrb_Rate_Pic = "bar_rating_star_0.gif";
}elseif ($Game_Esrb_Rating < 2){
$Esrb_Rate_Pic = "bar_rating_star_1.gif";
}elseif ($Game_Esrb_Rating < 3){
$Esrb_Rate_Pic = "bar_rating_star_2.gif";
}elseif ($Game_Esrb_Rating < 4){
$Esrb_Rate_Pic = "bar_rating_star_3.gif";
}elseif ($Game_Esrb_Rating < 5){
$Esrb_Rate_Pic = "bar_rating_star_4.gif";
}elseif ($Game_Esrb_Rating = 5){
$Esrb_Rate_Pic = "bar_rating_star_5.gif";
}
$row[] = $record;
$row[Esrb_Rate_Pic] = $Esrb_Rate_Pic;
}

my problem is with $Esrb_Rate_Pic, i can't put its value to the array
, i used $row[Esrb_Rate_Pic] = $Esrb_Rate_Pic; but it didn't work
can anyone help?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] divide the text

2004-12-14 Thread Ahmed Abdel-Aliem
hi, 
i have a page that views details of games from a database
i get the text and screen shots from the database, 
i want to view 3 pictures among the text when i view it
how i can view the 1st picture after 1/3 of the text and the next one
after 2/3 of the text without affecting the text itself

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] php self problem

2004-12-13 Thread Ahmed Abdel-Aliem
hi
thanks, i used it but i have a new problem but i solved it
so for people who will face the same problem
u can do this

$same_page = $PHP_SELF."?".$_SERVER['QUERY_STRING'];

this will go to the same page with the variables passed too

thanks for help

Ahmed Abdelaliem


On Mon, 13 Dec 2004 16:54:42 -0500, John Nichel <[EMAIL PROTECTED]> wrote:
> Ahmed Abdel-Aliem wrote:
> 
> 
> > hi
> > i use framework in my scripts, and i have a problem with forms that
> > calls the same page
> > for example
> > i have a form in that link
> > http://localhost/play/index.php?fuseaction=SiteMain.showGamePage&Game_ID=33
> > when i use $PHP_SELF it goes to http://localhost/play/index.php
> > so how can i make the form go to the same page with the passed
> > fuseaction and Game_ID variables
> > can anyone help ?
> >
> > Ahmed
> >
> 
> $_SERVER['QUERY_STRING']
> 
> --
> John C. Nichel
> ÜberGeek
> KegWorks.com
> 716.856.9675
> [EMAIL PROTECTED]
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php self problem

2004-12-13 Thread Ahmed Abdel-Aliem
hi
i use framework in my scripts, and i have a problem with forms that
calls the same page
for example
i have a form in that link
http://localhost/play/index.php?fuseaction=SiteMain.showGamePage&Game_ID=33
when i use $PHP_SELF it goes to http://localhost/play/index.php
so how can i make the form go to the same page with the passed
fuseaction and Game_ID variables
can anyone help ?

Ahmed

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] record fetching error

2004-12-13 Thread Ahmed Abdel-Aliem
hi
i have a table in my database which i try to fetch rows from it

here is the code i am using 

@ $db = mysql_connect ($server, $user, $pass);
mysql_select_db($database);
$test_tr = mysql_query("select * from art WHERE Game_ID = '$Game_ID'
desc LIMIT 1");
$record=mysql_fetch_array($test_tr);
$ART_File_Name = $record['ART_File_Name'];
$Art_Status = $record['Art_Status'];
$Art_Creation_Date = $record['Art_Creation_Date'];
$Art_ID = $record['Art_ID'];

the problem is when there is no row with the given Game_ID, i get a mysql error.
how can i get rid of that error 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] empty() problem

2004-12-12 Thread Ahmed Abdel-Aliem
Hi Group Members
i have a problem with function empty() 
i use it to check if user entered the form fields and store it in array

for example : 

if (empty($Game_rating))
$errors[] = "You didn't enter the Online Status for the Game.";

the problem when the user enters 0 in the form field
the empty function returns the error.

can i  use another function that doesn't return false when the 0 is passes ?

any help plz ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] html parser tutorial

2004-12-07 Thread Ahmed Abdel-Aliem
Doesn anyone plz knows a good tutorial for parsing html files ?
i have a html page and i want to parse information from it to insert
it into mysql.
i have a good experience in php, but i didn't write a parser before.
can anyone help plz ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] database query problem

2004-12-03 Thread Ahmed Abdel-Aliem
Hi, i have a page which views th content of tables, each row in one page,
there is a combo box which shows the IDs of each row, and when user
click on one, it redirects him to the same page with the new ID
there is two problems.
when there is no records in the dataabse i get mysql error.
and when i view the IDs in combo box i want them to be like 1 2  3 


/* this is to choose the last ID in the table if no ID is posted in the page */
if (!isset($id1)){
 @ $db = mysql_connect ($server, $user, $pass);
 mysql_select_db($db_name);
$test_tr = mysql_query("select purchase_id from purchase order by
purchase_id desc limit 1");
while ($record=mysql_fetch_array($test_tr)){
 $id1 = $record['purchase_id'];
}
mysql_close($db);
}
/* this is to list the IDs of the rows in the combo box, i want to
display them in form of 1,  2, 3 instead of the actual IDs numebrs */
@ $db = mysql_connect ($server, $user, $pass);
mysql_select_db($db_name);
$id = array();
$test_tr = mysql_query("select * from purchase order by purchase_id");
while ($record=mysql_fetch_array($test_tr)){
 $id[] = $record['purchase_id'];
}
/* this is where i get the row info to be displayed in the page, i
want it to not to display an error if there is no records in the
database */
@ $db = mysql_connect ($server, $user, $pass);
mysql_select_db($db_name);
$test_tr = mysql_query("select * from purchase WHERE purchase_id=$id1 ");
while ($record=mysql_fetch_array($test_tr)){
echo "whatever";
}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] record ID problem

2004-12-03 Thread Ahmed Abdel-Aliem
Hi,
i have a script which reads and edit and delete records from a database table.
the proplem is i nthe ID field.
when i delete a row the sequence of numbers still the same, i need a
function which return the IDs in the form of 1 2 3 4 5 6 7 8 9
instead of  1 3 7 9, 
can anyone help me plz ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Return value in Combo Box

2004-11-30 Thread Ahmed Abdel-Aliem
Hi, 
i have a form which user have to fill all the fields in it, when the
form is submitted it goes to a validation page which checks if users
entered all the required fields.

what i want to do is to make the validation page redirect to the form
again with the previuosly entered values, so the user can fill the
missing fields.

i can do this easily with input texts and text areas, but i don't know
how to do it with select and combo boxes.

can anyone please tell me how to make the choice the user selected in
the combo box be selected when the validation page redirects to the
form again ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Display only one filed of the repeated records

2004-11-30 Thread Ahmed Abdel-Aliem
Hi, 
i have a tables in database which fields is 
id - title - category

what i want to do is to display the categories entered in the
categories fields, without repeating any of them
for eample if the records is like follow

ID  Title   Cattegory
1Matrix   Sci-Fi
2Spartacus History
3Alexander History
4whatever   Horror

i want to list the categories only like this 

Sci-Fi - History - Horror

can anyone help me throught this please ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php