Forum

Posts

RECENTLY INDEXED PROGRAMMING SOLUTIONS OF PHP


Page 2 - Is there a better way to write this query It's extremely slow...  

just in case it's not obvious using left() on a primary key means it can't use the index on it, so that's why it's running slow. Continue Reading
Views : 146
Wednesday 24th of October 2012

preg_match regex help (uppercase words)  

I'm trying to match:1. A single word2. Consisting of all uppercase letters, digits, underscores, or periods3. Beginning with an uppercase letterHere is what I have: Continue Reading
Views : 266
Wednesday 24th of October 2012

help with encryption/decryption on IIS 5  

Can anyone suggest am appropriate method for encrypting and decrypting codes running PHP4 on a Windows 2000 Server box with IIS5?I was planning on using lib_mcrypt but after reading the user comments on php.net apparently it doesn't run well on anything less than IIS6. Continue Reading
Views : 190
Wednesday 24th of October 2012

Autopopulate Combo boxes, possible  

hey people, i encoutered another problem its the following:i need a combo box, where i can select mustiple values, BUT i need JS to autopopulate them, here... Continue Reading
Views : 198
Wednesday 24th of October 2012

need help quick with how to download image from a link  

i'm trying to download images from a link. an example would be: when you go to open your mail at whatever service and you go to download the attachment. when you click on the attachment to download it, a dialog box appears asking you where do you want to... Continue Reading
Views : 121
Wednesday 24th of October 2012

mail() not working  

Hi all,I'm developing a site where an email notification will be sent to the new subscriber added by the Master Admin. I use the following code:--------------------------------------------------------body="Hi, $f_name:\n\nYour account has... Continue Reading
Views : 175
Wednesday 24th of October 2012

Function with more than 2 arguments  

Why do i get a Warning: Missing argument 3 for check() when i try to put 3 arguments in a function? Continue Reading
Views : 203
Wednesday 24th of October 2012

Keyword Search Question  

Hi,I am trying to ssearch my DB for specific cars and can't seem to find an ideal solution.I want to pull out only sports cars.I was thinking that I could have a seperate list of words in an array somewhere in the PHP or a seperate text file and then when I run... Continue Reading
Views : 173
Wednesday 24th of October 2012

How to bookmark page guarded with session  

I have a site where the user's login (at a login page) and I setup the environment based on their preferences from a database. Then all other pages in the site check to see if the user has logged in. If they have not logged in, I redirect them to the login page.Now, a user wants... Continue Reading
Views : 197
Wednesday 24th of October 2012

Using Arrays to compare two records in a database set  

Hello fine ladies and gentlemen!I am trying to compare records in a database. The first record to the second, the second to the third. I'm comparing IP addresses. When they change, I want to echo "changed", when they are the same, I want to echo "same". (Actually I want to... Continue Reading
Views : 111
Wednesday 24th of October 2012

Getting rid of duplicates in mysql_fetch_array loop  

I have several rows that have the same value for a given field (classification). I want them to echo for a links menu based on these classifications, however, I have only got the code to print them out, including duplicates, so for every instance of the duplicate classification, there is a... Continue Reading
Views : 136
Wednesday 24th of October 2012

howto split one pdf A3 page into two A4 pages  

howto split one pdf A3 page into two A4 pages??I mean, I need php script which will recieve pdf file. This pdf file consists of one page(for example A3, A2, A1, A0 format). This script should split this page into several pages of A4 format (One page of A3 format should be... Continue Reading
Views : 205
Wednesday 24th of October 2012

fopen or fget not recognising the size of the file  

I have an anti-leech script which I have modified and it works...well kinda.It works fine with TXT files, but any PDFs or ZIPs and this only appears to present 50%-90% of the file when downloaded locally - thus not opening.The relevant code: Continue Reading
Views : 89
Wednesday 24th of October 2012

Problem with ORDER BY in mysql_query statement  

Hi folks,I'm a total newbe to php and mySQL programming so this may be kind of a dumb question.The following code works fine until I put the "ORDER BY lastName". Then I don't get any records returned. I'm think it's a syntax error but have tried everything to no avail. Any... Continue Reading
Views : 233
Wednesday 24th of October 2012

How do you test a TEXT field in PHP  

Hi,could you help a newbie ? I'm using dreamweaver MX 2004 and PHP, I have a search section with multiple TEXT fields. In order to lunch the proper MySQL... Continue Reading
Views : 179
Wednesday 24th of October 2012

Reading .txt files question  

Hello everyone,I have a very simple question that is probably easily solved, but I can't seem to figure it out. Here's the situation:I have a text file called music.txt, and it looks something like this: Continue Reading
Views : 175
Wednesday 24th of October 2012

Help with a setlist archive...  

I'll try to make this as coherent as possible. Here goes...I'm trying to learn PHP now, along with how to use MYSQL. One thing that's my main project is converting over a setlist archive for a band, of their past shows and which songs were played at which show.So. I... Continue Reading
Views : 215
Wednesday 24th of October 2012

cookies  

How can i check if a cookie exists, sample code would be greatgr. Razorblade Continue Reading
Views : 203
Wednesday 24th of October 2012

Passing a record to other page (URL)  

Hi,I'm using PHP/MySQL and Dreamweaver MX 2004On page1 I have a database, at the end I've added a column with a ADD TO LIST link. So when the user click it, I want to acquire the selected record and to send the data to another page (ListPage). In the list page I want... Continue Reading
Views : 193
Wednesday 24th of October 2012

Session write failure what is this  

I'm ussing two session variables to store user info and they are accessed on ach page of my site, but for some reason they stopped working and i have just found this error right at the bottom of my index page, that why i didn't see it before...Warning: write failed: No space... Continue Reading
Views : 213
Wednesday 24th of October 2012

syntax highlighting  

Hi ... hope you can help !!I'm trying to syntax highlight the string 'virtual(filename)'that's held in a database field as follows:- $string = $query_data["string"]; echo highlight_string($string); I'm getting formatted text but not... Continue Reading
Views : 219
Wednesday 24th of October 2012

user authentication  

hi!what's better: cookie or sessions for user authentication?tnx! Continue Reading
Views : 198
Wednesday 24th of October 2012

imagejpeg() problem.  

i was trying to make a script to make thumbnails.but it just wont finish imagejpeg() =D PHP Code: Continue Reading
Views : 200
Wednesday 24th of October 2012

Listing files. if ($var == *.jpg) "how do i"  

I have a page that lists files in a directory.I want to display a comment depending on what 3 letter suffix it has. (eg - it the file is a .jpg, I want to display "This is a JPG file"I tried : Continue Reading
Views : 144
Wednesday 24th of October 2012

option fields as default from SQL  

my code:ThisThatit enters the selected item into the database when the user clicks submit. how can i get the selected item to be default when the user edits... Continue Reading
Views : 190
Wednesday 24th of October 2012

Cookies and included files  

Hey all... I saw a thread related to this but there was no reply, so hopefully somebody might be able to answer this thread, since I think the previous people are trying to do the same thing... maybe by going in to more detail the question can get answered.What I am doing is... Continue Reading
Views : 196
Wednesday 24th of October 2012

problem with for loop used to create rows AND columns of data  

i want to create a table that is 5 colums wide, this table sits in another table that is claculated by the for loop below:i've created this for loop to create rows, each time the for loop is ran it adds 5 to $b_row. in the middle of this for loop is another for loop that will... Continue Reading
Views : 175
Wednesday 24th of October 2012

auto increment  

hii have a number of tables which have an auto increment field. how can i set the format for the auto increment i.e. 04xxx where 04 is the year and the xxxx is a number starting at 0001. i have made my tables using phpmyadminthanks Continue Reading
Views : 200
Wednesday 24th of October 2012

can not get back the value from $_SESSION  

hi, guys,i got a problem when using session!here is my proble:$_SESSION[$id]['plan']['type']="abc";like : array(id_1 => array(plan1 => array("type" => "abc", "num" => "123", ... Continue Reading
Views : 215
Wednesday 24th of October 2012

to pass a php variable to a pop-up  

hello! this is a bit long, so first thing i'd like to apologisei've got a php/mysql based web site. in some of the pages there are hyperlinks that send a variable ($id_fonte) by get method to another page (fonte.php), which queries the database and displays the... Continue Reading
Views : 193
Wednesday 24th of October 2012