Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF PHP


Can't figure out the right regular expression  

I've been reading quite much about regular expressions and using them for quite a while now but I do still have loads of understanding troubles with regexps.Straight to the problem description.I've got a content management system application that should perform simple rendering... Continue Reading
Views : 179
Wednesday 24th of October 2012

PHPLIB vs Native PHP Sessions  

I dabbled in PHP a few years ago and I used PHPlib to manage my sessions. After returning to PHP I see that PHP 4 has session management built in and also that PHPlib is still in use.Does PHPlib have any advantages over PHP4 sessions that makes it worth perservering... Continue Reading
Views : 183
Wednesday 24th of October 2012

Trying to compile a cpp file in Unix  

Hello all,I have this code that runs ok in windows, generates a compiled file, but in unix I only obtain the f.cpp file -------------------------------------------------------//get code from a previous page$cod = $_POST["code"];//create file... Continue Reading
Views : 175
Wednesday 24th of October 2012

Finding closest value within a range  

I am trying to figure out how to pick out a value that is closest to a predefined value. So I am looking for the value closest to 100 + or -. So I grab a set within a range because the whole set would range form 97.000 to 103.000. I haven?t found a way to do this thru a Select statement... Continue Reading
Views : 176
Wednesday 24th of October 2012

checkbox and text box array form  

A little problem with a site I am writing for a soccer club.I would like to create a form that lists from a database all the players in the squad and displays a checkbox to tick if they played this week, a text box to enter how many goals they have scored and a couple of... Continue Reading
Views : 184
Wednesday 24th of October 2012

Sorting help needed  

Hello,I am retreiving data from 3 different mysql servers and combining them all. I can sort them by $row easily enough via the mysql function ORDER BY but once all 3 servers are merged it list the first servers data at the top then the second etc.. I need to sort all the... Continue Reading
Views : 184
Wednesday 24th of October 2012

Logical Re-ordering of Rows in DB  

I am stuck creating a FAQ system using PHP & MySQL. I need something that has a rankign system to where the order of the items can be changed on a regular basis.I was thinking about having a listing of all the FAQ items and have a drop down with a list of the numbers that can... Continue Reading
Views : 177
Wednesday 24th of October 2012

help with a story  

I am making a short online story, where people input a sentance, it uploads to a mysql server and then when the people want to view it the whole story comes out as this:storyinput1. storyinput2. and so on in proper sentances.my problem is, i want to select a whole... Continue Reading
Views : 182
Wednesday 24th of October 2012

Seperate lines + ignore first line in file with fopen  

Hi, i am opening a .csv file with fopen en don't want to display the first line + i want to seperate the lines. This because i want to import it in a mysql database.This is the current code: Continue Reading
Views : 94
Wednesday 24th of October 2012

Script Times out on server  

I have a script that spiders about 400 links (with a couple of seconds pause inbetween each link) to check if the links are valid. The script works fine on the test server but on the production server it does not, so I'm thinking maybe something in the php.ini , or an apache setting? Continue Reading
Views : 176
Wednesday 24th of October 2012

pulling and displaying if only three rows  

I am trying to get my attendance module off z ground and am wondering about being able to pull ("SELECT") the person_ID only if there are three entries in the table.The other thought would be to pull everyone who met the criteria and then only display the result if there are... Continue Reading
Views : 194
Wednesday 24th of October 2012

SELECT and DropDown Menu  

Hi, I have a couple of questions:1.- Im trying to get all the data from a table with the following SELECT, and doest works me. What could be the Problem? PHP Code: Continue Reading
Views : 173
Wednesday 24th of October 2012

including file  

is there any way, like in most other languages, to in the include statement make reference to a folder and have all the files within the folder be included?I tried every possiblity that I could think of, but no go. I am hoping there is a way that I haven't thought of, because... Continue Reading
Views : 184
Wednesday 24th of October 2012

Form not displaying time correctly 2nd time  

Hi ive got the following script. Which when first clicked on displays the information correctly. The user is then allowed to edit the event and the form is validated to check all the necessary fields are submitted. If a field is missing the following piece of code is displayed... Continue Reading
Views : 218
Wednesday 24th of October 2012

echoing into text area...  

heyi am querying a db and echoing the result into a form to be edited. but i cant echo into a text area?????the text boxes work fine...can anyone tel me why cus i am doing it exactly the same for the text area and i know there is something that should be... Continue Reading
Views : 219
Wednesday 24th of October 2012

Line Breaks and word-wrapping  

Hello, I was wondering what I can do to this: Continue Reading
Views : 177
Wednesday 24th of October 2012

Problem with Paginating and randomization  

I am having a problem of keeping the randomized mysql results throughout all of the paginated pages. Here is the code:$bk_query = "SELECT * FROM books ORDER BY RAND() LIMIT $recordstart,$perpage"; $book_res = mysql_query($bk_query); some type of output goes... Continue Reading
Views : 197
Wednesday 24th of October 2012

Page 2 - Form Pagination  

Hi kuza55,I'm taking the script further and added a few dropdown fields into the form.txt file and it is working great. What I'm trying to do is to have a month dropdown box that will read the from an array like this: Continue Reading
Views : 154
Wednesday 24th of October 2012

replace date format with a text file  

Hi,I dumped data from minisql database into a text and want to use that text to insert it in MySQL database,my problem is the date format in MiniSQL is DD-MON-YYYY and the MySQL format is YYYY-MM-DD, so can i change all dates format in that text files without... Continue Reading
Views : 196
Wednesday 24th of October 2012

For loop problem  

I have a 'for' loop code which is causing me a small problem. If I have the following vars$trunk_start = 700$trunk_end =703700 through to 703 will be inserted into my databaseBUTif I have vars$trunk_start = 01$trunk_end = 0301 followed by... Continue Reading
Views : 185
Wednesday 24th of October 2012

Problem with defining constant  

Hello!I have a file called index.php (original, huh?) in which I define IN_SYSTEM = true. All other files which are included after that command check to see if IN_SYSTEM is defined: Continue Reading
Views : 204
Wednesday 24th of October 2012

Checkboxes and Arrays... again (This HAS to be simple!)  

Okay...does anyone have a sniplet of a code to detect variables in an array?what i need is:if variable = "a" then it will print "something about A"if variable = "b" then it will print "something about B"it's so simple yet just... Continue Reading
Views : 140
Wednesday 24th of October 2012

User Specific Menu Items  

Hi Everyone,Our church has a set of page which are protected via htaccess files in a structure that allows for different access levels. Currently I just have a link for each level of access to display a menu which contains the pages they can get into (e.g. level 3 access users... Continue Reading
Views : 166
Wednesday 24th of October 2012

syntax help, imagesetpixel  

I haven't been able to find anything like this so I don't know if it's possible, but I need to create a small complex image with 24 horizontal pixels and 24 vertical pixels. It would then be called one slice or pixel row at a time, 1x24 pixels, depending on the choices the user... Continue Reading
Views : 198
Wednesday 24th of October 2012

works fine online but not on localhost..query problem  

i have a page that works fine online...but when i take it offline onto my system i cannot run the page.. i get an error Quote: Continue Reading
Views : 134
Wednesday 24th of October 2012

storing passwords encrypted....  

i was told that it is not good to store passwords in a mysql db unencrypted...so i thought i would try doing this to it PHP Code: Continue Reading
Views : 233
Wednesday 24th of October 2012

Search Submission Code  

Does any know the easiest method of integrating a google add url submit box into my site? I 've got the form to get the site address and comment box, and I know the url to send the data to, but how do I actually send it and how can I get the result from google and display it on... Continue Reading
Views : 162
Wednesday 24th of October 2012

Page 2 - PHP and MySQL  

Thanks for all your help, it works great now.Thizgeek Continue Reading
Views : 162
Wednesday 24th of October 2012

authentication for guestbook  

im making a guestbook and from my viewing guestbook pagethere is an option to delete records from my database. but i do not wish to allow any unauthorized people to edit my database. let's say when i delete the entry, a form or page will pop up to validate my username n password. how... Continue Reading
Views : 196
Wednesday 24th of October 2012

Track Email  

I would like to track when someone opens an email I've sent them. This is not for spamming purposes, I promise.Anyone have any ideas? Continue Reading
Views : 161
Wednesday 24th of October 2012