Hi, I've got a flat file/text file which I'm currently using as a member database for my site (not advisable I know.. but still learning here).
In a section of code I need to separate the fields to make various checks later in the code
I use this line to do that..
list ($name, $pass, $fileidnumber) = split ('|', $line);
Yet.. I keep getting "undefined offset" messages.. even when all 3 fields are filled in for all records.. eg..
Fred|bonkers|3n
Is it the new line causing the problem?
Also, the server is a bit peculiar in behaviour, it won't let me upload empty text files to start with (0kb).. the only way around it is for me to add a blank line or something to make it at least 1kb so the server notices it.. so in other words.. if Fred's record was the only one in the database, there'd be a space (I guess) underneath his record (all future records are added to the top of the file, but the space will always come last when checking)
If anyone out there can help or give ideas as to why this is happening I'd be grateful.. thanks
why preg_match_all does not return the number of matches
My regex looks likeX[^\x{4e00}-\x{9fa5}]*Y(where X and Y are two Chinese characters)and my expression looks likepreg_match_all("/".$regex."/iu", $content, $out,
Bar charts using Graphical Framework.
I am using Graphical Frameworks(GFW) to create a chart Graphic . There is no problem with the data displayed on the bar graph .The problem is that Y-axis of the chart resizes in function to the
upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please tell me how can i restrict that
Help with writing "$" with fopen
I just can't get my syntax correct. Could someone help me please? I am trying to write a connect file for inclusion as part of the installation routine for an app I am working on. I need this line to
Filename like the user name
I am creating a form and storing the values in file. Could anyone please tell me how to write a code in php for creating a filename based on the user name as in the form.Thanks
Google voice
I currently have a form in html, but I want it in php so the information is not in the source code.It all works and when you put in the name and number it will call. When you push the call button it
how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.If a feed takes long than 20 seconds to download, I wish to terminate it and proceed to the next, is there any way of terminating
Web Host List
Here is a list of web hosts that offer PHP and MySQL. It is no where near a full list, but it is most popular. I'm locking this so you can't reply. I am pulling this list from the most popular google
Php mysql - select?
Hi i have this code:Code: $iteminfo = mysql_query("SELECT desc FROM wc_items WHERE itemid = '$_GET[id]'") or die(mysql_error()); And it gives meYou have an error in your SQL syntax; check
Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along with 4 images. I have developed the form and am able to add the data but due to my abilities and I