Jump to content
Updating IPB tonight Read more... ×


This topic is now archived and is closed to further replies.


Text database to Mysql

Recommended Posts

Hi Everyone,

Let me start by saying that I do not know anything about PHP script. I have this script that I would like to change but I don't have the foggiest idea on how to do it.
Presently this script reads from a text file that use this type of “|”separator, now I would like to change this code to read from a Mysql database, plus add other fields that are not currently read. I know that some of you like the challenge and I can tell you that this will be so.
Is there anyone that will do this for free?

This is part of the script, I can post the rest or email the rest to the person who is willing to help.

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<?PHP
$fp = file("reg.txt");
$search = "/".$_POST['search']."/i";
$y = 0;
for($x=0; $x<count($fp); $x++){
$search_text = "";
$search_text = split("\|",$fp[$x]);
$search_text = $search_text[4];
}else if(@$_POST['radiobutton']==4){
$search_text = split("\|",$fp[$x]);
$search_text = $search_text[3];
}else if(@$_POST['radiobutton']==3){
$search_text = split("\|",$fp[$x]);
$search_text = $search_text[2];
}else if(@$_POST['radiobutton']==2){
$search_text = split("\|",$fp[$x]);
$search_text = $search_text[1];
$search_text = split("\|",$fp[$x]);
$search_text = $search_text[0];
} [/quote]

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.