Search found 19 matches

by unisabilly
Wed Aug 15, 2012 2:18 am
Forum: PHP General
Topic: fopen() serial port
Replies: 0
Views: 654

fopen() serial port

Good day all : I have an issue here, i try to use php to send the SMS via my 3G USB modem, as I try to send it with hyperterminal, it works perfectly with COM port number 27. as I try to fopen COM port 27 it return with the following error message : Warning: fopen(COM27:) [function.fopen]: failed to...
by unisabilly
Fri Jan 19, 2007 5:00 am
Forum: mySQL & php coding
Topic: Need Help with mysql table structure !
Replies: 0
Views: 1077

Need Help with mysql table structure !

suppose that I have two table created : parts(part_id,part_cat,part_name,part_descript,part_pic,part_price) 1,'wheel','storm wheel','No description','st_wheel.gif',250 2,'wheel','normal wheel','No description','nor_wheel.jpg',150 3,'gearbox','turbo gear','No description','tur_gear.png',4500 4,'gearb...
by unisabilly
Sun Aug 06, 2006 4:21 pm
Forum: PHP General
Topic: for-in loop ~
Replies: 1
Views: 1475

for-in loop ~

Is there any syntax in php which is similar to the "for-in loop" of javascript !?

eg. of 'for-in loop' of JavaSrcript ~

Code: Select all

for (var in object) {
    statements
}
by unisabilly
Wed Jun 28, 2006 2:05 am
Forum: mySQL & php coding
Topic: need help with group by ~
Replies: 2
Views: 2439

Re: need help with group by ~

Redcircle wrote:

Code: Select all

select * from table group by subject order by mark desc
.......... somehow the result is not correct ~
by unisabilly
Tue Jun 27, 2006 1:30 am
Forum: mySQL & php coding
Topic: need help with group by ~
Replies: 2
Views: 2439

need help with group by ~

suppose I have a table as follow : name subject mark -------------------------------------- Michael Math 60 Michael History 68 Ellen Math 72 Ellen English 58 Ellen Science 43 Jason Biology 42 Jason English 67 Jason Accounting 73 Jason Math 68 Julia History 76 Julia Science 54 Julia Biology 77 how ca...
by unisabilly
Fri May 19, 2006 6:14 am
Forum: PHP coding => General
Topic: Need HELP with Regular Expression !!
Replies: 1
Views: 1097

Need HELP with Regular Expression !!

I'm so unfamiliar with regular expression, but i spend few days on it and come out with the following.. function bbs_decode(&$message) { $search = array ('/(\[img=)[\'"]?(.*?)[\'"]?]/', '/(\[img])(.*?)\[\/img]/', '/(\[url=)[\'"]?(http:\/\/)?(.*?)[\'"]?](.*?)\[\/url]/', '/(\[size=)(\d{0,2})](.*?)(\[\...
by unisabilly
Mon May 15, 2006 11:36 pm
Forum: JavaScript
Topic: textarea control !!
Replies: 3
Views: 3862

textarea control !!

<input class="bginput" type="text" name="keywords" size="15" value="enter your text here ..." onFocus="if (this.value=='enter your text here ...') {this.value=''}" onBlur="if(this.value=='')this.value='enter your text here ...' "> what will the code look like if i want the 'textarea' do somthing li...
by unisabilly
Fri May 12, 2006 9:09 am
Forum: PHP coding => General
Topic: $SERVER info ~
Replies: 3
Views: 1379

$SERVER info ~

can anyone please tell me the different between the following server info ... and if I wanna get the user ip, which one should I use !? ... thanx :) $_SERVER["LOCAL_ADDR"] = 127.0.0.1 $_SERVER["REMOTE_ADDR"] = 127.0.0.1 $_SERVER["REMOTE_HOST"] = 127.0.0.1 $_SERVER["HTTP_X_FORWARDED_FOR"] = $_ENV["LO...
by unisabilly
Sat May 06, 2006 10:39 am
Forum: mySQL & php coding
Topic: select numbers !?
Replies: 6
Views: 2967

gesf thank you for your reply ~ there are two questions ~ 1. if i use auto increment, the id will be generated while i enter the data, whick may cause some problem if i select certain rows with conditions, the row number (id) might not be in continue series. 2.can only use SQL to solve the question ...
by unisabilly
Fri May 05, 2006 2:20 pm
Forum: mySQL & php coding
Topic: break into separate lines (solved)
Replies: 2
Views: 1782

i found a function which can solve this question : nl2br( ) :D
by unisabilly
Fri May 05, 2006 2:18 pm
Forum: mySQL & php coding
Topic: select numbers !?
Replies: 6
Views: 2967

select numbers !?

is that possible to select numbers from 1 to number of results, i don't know how to express my question ... let me give an example ~ i want to select the name and surname of the students i can simply use : "select name,surname from students" and the result will be: name surname ---------------------...
by unisabilly
Fri May 05, 2006 11:47 am
Forum: PHP coding => General
Topic: online status ~
Replies: 0
Views: 725

online status ~

actually i'm trying to create a forum with php and mysql there are few questions about the online/offline status .... 1. the online status of the member 2. the MSN online status of the member 3. the yahoo messenger online status of the member 4. the icq online status of the member 5. all other insta...
by unisabilly
Thu May 04, 2006 12:42 pm
Forum: mySQL & php coding
Topic: break into separate lines (solved)
Replies: 2
Views: 1782

break into separate lines (solved)

I have a little question here ... I enter the following paragraph into the database (mysql datatype = text): this is a line this is an other line this is the third line if i select the paragraph out from the database and display it with echo, it will display the whole thing in one line, so the outco...
by unisabilly
Wed May 03, 2006 11:05 am
Forum: mySQL & php coding
Topic: divide into pages (solved)
Replies: 1
Views: 1460

divide into pages (solved)

for every forum, if the posts exceed certain amount, it will divide into several pages. the question is how can I do that !? for example the first page of the forum i can just use " select content from post order by time limit 10 " I think this will do the first page, but with the second page how ca...
by unisabilly
Fri Jan 27, 2006 2:37 am
Forum: PHP coding => General
Topic: how to read url
Replies: 11
Views: 3462

Hey, $_SERVER['REQUEST_URI'] doesnt working on IIS. I dont know why it is not working, can anybody tell me? I use $_SERVER['HTTP_REFERER'] works in both. try the following code, it should display all the variables in $_SERVER <?php foreach ($_SERVER as $key => $value) echo '$_SERVER["'.$key.'"] = '...
by unisabilly
Sat Jan 21, 2006 9:40 am
Forum: PHP coding => General
Topic: how to read url
Replies: 11
Views: 3462

how to read url

is there any way that i can read the actual url entered by the user !? ie. not $_SERVER["SCRIPT_NAME"] nor $_SERVER["PHP_SELF"] coz those two give the excuted page instead of the actual url entered by the user, what i am looking for is something like var url = document.write(location) of javascript....
by unisabilly
Sun Aug 21, 2005 5:19 am
Forum: PHP coding => General
Topic: how to read all the file names under certain directory ?
Replies: 1
Views: 623

how to read all the file names under certain directory ?

hi there ~ Is there any function that i can use to read all the file names (with or without the path does not matter) of a dirctory into an array ? for example there are 5 files under a directory called "pix" those files are a.jpg b.jpg c.jpg d.jpg e.jpg the output should be $filename[0] = a.jpg $fi...
by unisabilly
Wed Aug 17, 2005 8:18 am
Forum: PHP coding => General
Topic: [Help] Eval function with two dimention array !!
Replies: 3
Views: 953

Re: [Help] Eval function with two dimention array !!

$compile_line ='my name is ' . $temp['name']['first']; try this. sorry i didnt make it clear, the example might be just a line from the tpl files which means " my name is ... " is just a part of the tpl file, for example the tpl might look like following: <table> <tr> <td> my name is $temp['name'][...
by unisabilly
Wed Aug 17, 2005 6:17 am
Forum: PHP coding => General
Topic: [Help] Eval function with two dimention array !!
Replies: 3
Views: 953

[Help] Eval function with two dimention array !!

Hi there ~ I have a question about eval function, i'm trying to read a tpl file line by line and convert the output to html, everything works fine except if the tpl contains two dimension array of variable my eval function fails to read the variable, following is an example : $temp["name"]...