Search found 53 matches

by vietboy505
Wed Apr 12, 2006 9:21 am
Forum: Regex
Topic: preg_replace() ?
Replies: 1
Views: 1667

preg_replace() ?

Should I use preg_replace to search for symbols I don't like in a string? $a=1234567891@mail.com $b=a b 9876543210 $c=1-1234567890 $d=123-456-7891 $a=preg_replace('/\s+/', '', trim(a)); $a=preg_replace('1-', '',$a); $a=preg_replace('(', '',$a); $a=preg_replace(')', '',$a); $a=preg_replace('@mail.com...
by vietboy505
Wed Apr 05, 2006 11:05 pm
Forum: PHP - Code
Topic: CVS Parsing
Replies: 1
Views: 328

CVS Parsing

Php can parse XML file using simplexml.. what about CVS file, any function for that?
by vietboy505
Fri Mar 31, 2006 11:12 am
Forum: Databases
Topic: concatenate in mySQL
Replies: 6
Views: 1244

I try the code below, which is almost there. I think the search & replace doesn't work. $previous_SolResult=mysql_query(" SELECT solution FROM $table WHERE id='$frm_id' "); $previous_Solution=mysql_result($previous_SolResult,0); $new_Solution = preg_replace('/"$previous_Solution&q...
by vietboy505
Fri Mar 31, 2006 10:07 am
Forum: Databases
Topic: concatenate in mySQL
Replies: 6
Views: 1244

the above code I have try before and it's the same output with CONCAT


I try to use \\n , it gives the same output as the two above code.
by vietboy505
Thu Mar 30, 2006 10:41 pm
Forum: Databases
Topic: concatenate in mySQL
Replies: 6
Views: 1244

concatenate in mySQL

mysql_query("UPDATE $table SET status= \"$frm_status\", solution= concat(\"Updated: $newModifyDate\n\", \"$frm_solution\n\n\") WHERE id= \"$frm_id\" "); I want it to update and look like this: Updated: 2006-03-30 15:55:55 a Updated: 2006-03-30 15:55...
by vietboy505
Wed Mar 29, 2006 11:44 am
Forum: PHP - Code
Topic: IIS Authentication
Replies: 2
Views: 247

thanks..

Got it now.
by vietboy505
Wed Mar 29, 2006 11:30 am
Forum: PHP - Code
Topic: IIS Authentication
Replies: 2
Views: 247

IIS Authentication

I have setup my IIS to ask for username & password to view my intranet from
http://www.devguru.com/features/tutoria ... cation.asp

Now I was wonder how can I grab this username in PHP when they're login?
by vietboy505
Tue Mar 28, 2006 12:25 pm
Forum: PHP - Code
Topic: submit & remember data
Replies: 4
Views: 439

<?php include("config3.php"); ?> <form name="DailyFORM" action="<?php echo $PHP_SELF; ?>" method="post" align="right"> <table> <tr> <td align="right">NAME: </td> <td><select name="NameQuery"> <?php $nameName = array('ALL','1','2'...
by vietboy505
Fri Mar 24, 2006 4:35 pm
Forum: PHP - Code
Topic: submit & remember data
Replies: 4
Views: 439

Thanks! That work! What about drop down menu? The code below will show blank first then when I choose one, it show the previous data but it has duplicate because the actual HTML code & php combine. How can I fixed that to show value & the display name when it's different? <tr> <td align=&quo...
by vietboy505
Fri Mar 24, 2006 2:58 pm
Forum: PHP - Code
Topic: submit & remember data
Replies: 4
Views: 439

submit & remember data

I want to enter the data back once a user click submit and they haven't fill all data in yet. How would I do that? Also, if all fields are enter. It will go to another page instead staying on the same page. I use: <form name="create_form" method="POST" action="<?php echo $PH...
by vietboy505
Fri Mar 24, 2006 1:02 pm
Forum: PHP - Code
Topic: move data from table to another table
Replies: 2
Views: 390

True..

I want all date before starting -1 week ago.

I try to put this in SQL statement and it doesn't work. In fact, I do have data before that date.

Code: Select all

dateModify <= '$overWeek'
by vietboy505
Thu Mar 23, 2006 10:40 pm
Forum: PHP - Code
Topic: move data from table to another table
Replies: 2
Views: 390

move data from table to another table

I want to move the row from OLD TABLE to NEW TABLE where: the OLD TABLE, status == 'S' & the dateModify is over a week, move that row (all data to the NEW TABLE). Then delete that row on the OLD TABLE. I try the code below, nothing happen, no data is output. I try to change to +1 day, it's still...
by vietboy505
Fri Mar 17, 2006 9:47 am
Forum: PHP - Code
Topic: trim: take out white spaces
Replies: 1
Views: 235

trim: take out white spaces

feyd | Please use and tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color] I have a form for use to enter... Bu...
by vietboy505
Tue Mar 14, 2006 12:52 pm
Forum: Miscellaneous
Topic: XML: Attributes vs. Children
Replies: 4
Views: 2055

I like children rule better.

XML look much nicer.
by vietboy505
Tue Mar 14, 2006 8:55 am
Forum: PHP - Code
Topic: show previous day from today
Replies: 2
Views: 226

thanks! 8)