[PHP] AS A MATTER OF INTEREST
Can you fake IP addresses and referer addresses with the PHP header command. I want to contact a remote php script and not have my page as the referer or ip address. Is this possible with sockets or even just fopen()? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] JAVASCRIPT INCLUDES
In HTML, you can do this: script language=JavaScript src=http://localhost/top_stuff.php?affiliate=1;/script But the script isn't executed before being used by the browser, it's returned with PHP tags and all, which obviously gives JS errors. Is there any setting you can change in Apache that let's you do this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] JAVASCRIPT INCLUDES
The Javascript has to be called from other servers, some who might not even support PHP. And yeah, when you actually visit the URL, it displays perfect JavaScript Thanks anyway Chris Shiflett [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Georgie, I'm not sure what you're wanting to do here, but it looks like you just want to use PHP to write some javascript. There's no need to make the browser request an additional page for this. Just do something like this in your PHP script: script language=javascript ? PHP stuff here - output is valid javascript ? /script or even: script language=javascript ? include(/home/georgie/top_stuff.php); ? /script However, speaking directly to your problem, see what you see when you access that URL (http://localhost/top_stuff.php?affiliate=1) yourself. If your PHP scripts are not being processed and instead are just displayed in the browser, then your Web server is not configured to process PHP. Happy hacking. Chris Georgie Casey wrote: In HTML, you can do this: script language=JavaScript src=http://localhost/top_stuff.php?affiliate=1;/script But the script isn't executed before being used by the browser, it's returned with PHP tags and all, which obviously gives JS errors. Is there any setting you can change in Apache that let's you do this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: JAVASCRIPT INCLUDES
Solved the problem. In case anyones wondering, I had the PHP script starting with a script and ending with /script when I already had that done in the HTML page. Simple Georgie Casey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In HTML, you can do this: script language=JavaScript src=http://localhost/top_stuff.php?affiliate=1;/script But the script isn't executed before being used by the browser, it's returned with PHP tags and all, which obviously gives JS errors. Is there any setting you can change in Apache that let's you do this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ERROR
I'm getting a: Parse error: parse error, unexpected $ in /home/virtual/site264/fst/var/www/html/include/paypal.php on line 126 in my script. the script only has 126 lines, and I cant find any $ that might be causing it. But there's a lot of loops to close in the script so I'm thinking one of these could be to blame. So my question is, does PHP return this error when some loops aren;t closed?? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Variables Case Sensitivity??
is there any way to make variables NOT case sensitive?? A partner is posting information to one of my PHP scripts and cant gurantee that variables passed will be lowercase -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables Case Sensitivity??
yea, i probably didnt make that clear its the variables NAMES that he can't gurantee to be lowercase eg hell pass http://www.server.com/test.php?NAME=JohnIDNumber=12 when im expecting $name and $idnumber sorry Robert Cummings [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Georgie Casey wrote: is there any way to make variables NOT case sensitive?? A partner is posting information to one of my PHP scripts and cant gurantee that variables passed will be lowercase Sure, whatever you use make it lower case, whataever he send, cook to lower case. Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:[EMAIL PROTECTED] | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Writing Files
How do you write files so that theyre chmoded 777 by default. the folders theyre written to are 0777 but the files aren't. so i cant delete or modify the files through PHP, i have to first chmod them with FTP, which takes ages. -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Security Permissions
before on my host, i could make directories and write files in PHP. now i cant. my host removed frontpage extensions in the meantime, could they be what allow me? or do they have nothing to do with it -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] FUNCTIONS
i wrote a function do write a file for me on info taken from a db, and wrote a script with a for loop going through every row in the db, and calling the function. so the function is called about 200 times. but i'm getting weird results, the files are corrupted. its grand when i just go one at a time. so i'm assuming variable values must have been left set from the las for loop. so how do i clear ALL variables in the function?? TANX -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FUNCTIONS
yea, but what about varibales in the actual function?? Met [EMAIL PROTECTED] wrote in message 003c01c2479f$ee948c40$6901a8c0@SURVIVAL">news:003c01c2479f$ee948c40$6901a8c0@SURVIVAL... In the top of the loop, before you set the variables from the database do this. unset($variable); OR $variable = ; Either will do. ~ Matthew -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Monday, August 19, 2002 10:30 AM To: [EMAIL PROTECTED] Subject: [PHP] FUNCTIONS i wrote a function do write a file for me on info taken from a db, and wrote a script with a for loop going through every row in the db, and calling the function. so the function is called about 200 times. but i'm getting weird results, the files are corrupted. its grand when i just go one at a time. so i'm assuming variable values must have been left set from the las for loop. so how do i clear ALL variables in the function?? TANX -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FUNCTIONS
its supposed to write a MIDI file from some music notes, the start of the MIDI file is grand but the end has some of the MIDI from the next database record! Jay Blanchard [EMAIL PROTECTED] wrote in message 002e01c2479f$1dbf6590$8102a8c0@000347D72515">news:002e01c2479f$1dbf6590$8102a8c0@000347D72515... [snip] i wrote a function do write a file for me on info taken from a db, and wrote a script with a for loop going through every row in the db, and calling the function. so the function is called about 200 times. but i'm getting weird results, the files are corrupted. its grand when i just go one at a time. so i'm assuming variable values must have been left set from the las for loop. so how do i clear ALL variables in the function?? [/snip] What do you mean by corrupted? It should be simple; Open the file while file open read a record from the database into the file when no more records close file Maybe you need to place a proper newline character at the end of each record or something like that. Can we have some more information to go on? Thanks! Jay *** * Texas PHP Developers Conf Spring 2003 * * T Bar M Resort Conference Center * * New Braunfels, Texas* * San Antonio Area PHP Developers Group * * Interested? Contact [EMAIL PROTECTED] * *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] error reporting
rite, without access to the php.ini file, how can i get php to print all errors on my web server. it runs linux -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mkdir!
When I create directories in PHP through the mkdir() command, what number should I set the mode so I have the priveleges to delete the directory through FTP? I used to always set them to 777 but then when I try to delete the directories in FTP, it doesnt let me, and I have to write a PHP script that deletes the folders! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Auto Increment Problems....
rite, my primary key column (id) is set to auto_increment as usual which is very handy. But when I delete a row, the auto_increment just keeps incrementing and there's this 'hole' left where I deleted the row! Apart from this looking ugly, it poses another problem. In my PHP script where I can add new rows, I query the table, checking how many rows in the table altogether and set the new id as the next number, but this doesnt work if theres 'holes' in the id field, as the new record tries to overwrite another id. So I've 2 questions 1) Can the next auto_increment value be 'set' by a SQL query 2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in the ID column?? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ORDER BY from 2 tables
i assume this is a simple question... how can I SELECT * FROM 2 different tables in the same query, ORDER BYing the 'hits' column, which both tables have. eg, 2 tables i have are similiar and i want to merge them and then select everything ordering by hits -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] another problem
well, i solved the last problem on my own but now i need help on my new one :-) how do you convert text to hexadecimal with PHP? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hex Help Please...
Rite, There's a PHP script that takes a monochrome BMP and converts it into some sort of hex code and I've noticed some patterns with this code. This image is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned, theres 252 chars, which is 1008 divided by 4. So I guessed the image is split into 4 pixels each. So if I pass an image with the first pixel black and everyhting else white, it returns 8 for those 4. If I pass an image with the first and second black, it returns c. With the first three black, it returns e. With the first 4, f. And if I have the 5th pixel black it goes onto the next char code, eg returning f for the first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the next 4. In total it returns f8. PS I tried reading in each pixel of the script, checking if it was black or white, 1 for black, 0 for white. Then converting these 0s and 1s from decimal to hex, then converting from binary to hex, but to no avail. Then I tried taking a set of 4 1s or 0s and converting them, but still no luck. So my questions is, does anyone know how theyre encoding the image I could probably could decipher the coding with some experimentation but it really looks like hex and I might be wasting my time. TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Hex Help Please...
OK, i thought I found my solution but... How come if I convert from 1000 from Binary to Hex in calculator, it returns 8, but when I use the PHP bin2hex function, it returns loads of 3s and 0s Georgie Casey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rite, There's a PHP script that takes a monochrome BMP and converts it into some sort of hex code and I've noticed some patterns with this code. This image is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned, theres 252 chars, which is 1008 divided by 4. So I guessed the image is split into 4 pixels each. So if I pass an image with the first pixel black and everyhting else white, it returns 8 for those 4. If I pass an image with the first and second black, it returns c. With the first three black, it returns e. With the first 4, f. And if I have the 5th pixel black it goes onto the next char code, eg returning f for the first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the next 4. In total it returns f8. PS I tried reading in each pixel of the script, checking if it was black or white, 1 for black, 0 for white. Then converting these 0s and 1s from decimal to hex, then converting from binary to hex, but to no avail. Then I tried taking a set of 4 1s or 0s and converting them, but still no luck. So my questions is, does anyone know how theyre encoding the image I could probably could decipher the coding with some experimentation but it really looks like hex and I might be wasting my time. TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Searching...
in ym search page, i construct a sql query from user input to search my database, and i run this query to get totalresults. Then run another query with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per page. My question is, is this inefficient? is there any better way i dont know of? or does the 2 queries not mka emuch of a difference -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Emulating HTTP File Uploads
Does anyone know how to upload a file through PHP through the HTT interface. I use fopen() to open remote php scripts using the GET method for non-file uploads but it doesnt work with HTTP POST or file uploads. Does anyone have any ideas? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] safe scripting
How do i setup safe mode scripting (each script has a different uid) on my win32, apache, php setup? my plesk host has to use it and i want to be able to test my scripts on my own computer. i set safe mode = On in my php.ini file but the script still lets me include a file, whereas the script on my proper host doesnt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SAFE MODE
How do i setup safe mode scripting (each script has a different uid) on my win32, apache, php setup? my plesk host has to use it and i want to be able to test my scripts on my own computer. i set safe mode = On in my php.ini file but the script still lets me include a file, whereas the script on my proper host doesnt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Simulating a FORM POST thing (HELP!)
Rite, when you see a web form, you know you can simulate the submit by filling in the values in the address field, just like a GET method, and it usually works the exact same. But how do you do it when one of the fields in the form is a file upload?!?!?! For the record, its a GIF file you've to upload. Is there any way to do this in PHP?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simulating a FORM POST thing (HELP!)
i'm getting an error message saying my BMP file i'm trying to convert isnt a valid WBMP file? is dere a difference between BMP and WBMP? I just opened my GIF file into PSP7 and and saved as a windows bmp. why isnt it working? Peter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ?PHP $im = createfrombmp(image); print FORM METHOD=\post\ ACTION=\actionpage.php\; print INPUT TYPE=\hidden\ NAME=\image\ VALUE=\$im\; ? you get the idea I think PHP does have other funtions for file uplading though. Georgie Casey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rite, when you see a web form, you know you can simulate the submit by filling in the values in the address field, just like a GET method, and it usually works the exact same. But how do you do it when one of the fields in the form is a file upload?!?!?! For the record, its a GIF file you've to upload. Is there any way to do this in PHP?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simulating a FORM POST thing (HELP!)
that function doest exist! Peter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Windows Bitmap = BMP file a WBMP is a wireless bitmap image and is designed for display on mobile phones. A lot of software doesn't understand the format. You need to use createfrombmp() not createfromwbmp() Georgie Casey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... i'm getting an error message saying my BMP file i'm trying to convert isnt a valid WBMP file? is dere a difference between BMP and WBMP? I just opened my GIF file into PSP7 and and saved as a windows bmp. why isnt it working? Peter [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ?PHP $im = createfrombmp(image); print FORM METHOD=\post\ ACTION=\actionpage.php\; print INPUT TYPE=\hidden\ NAME=\image\ VALUE=\$im\; ? you get the idea I think PHP does have other funtions for file uplading though. Georgie Casey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rite, when you see a web form, you know you can simulate the submit by filling in the values in the address field, just like a GET method, and it usually works the exact same. But how do you do it when one of the fields in the form is a file upload?!?!?! For the record, its a GIF file you've to upload. Is there any way to do this in PHP?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] WAP
How do I configure my Win98 Apache/MySQL/PHP test server to be able to show me WAP pages. I followed a tutorial on PHPBuilder but when I test pages with my WAP emulator, it returns a empty page error. Does anyone know any other web links for configuring to WAP, especially for WIN32 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP! Errors!
my host returns this err message when i try to open a page on another server: Warning: php_hostconnect: connect failed in Warning: fopen(http://www.blah.com/index.php?api_id=12123user=blahpassword=blahfr om=353879820641to=353879820641text=Your+confirmation+code+is%3A+%0A45746, r) - Bad file descriptor Warning: Supplied argument is not a valid File-Handle resource in it works fine when testing on my win32 apache with php WHY AM I GETTING AN ERROR? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP!
I need to execute a script on another server in one of my scripts, eg by visiting a link http://www.com.com/script.php?var1=blahvar2=blah i cant use curl or sockets as my server dont have them insatlled. what other options do i have? the variables being passed are sensitive so they cant be viewed in the source HTML -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting my host to implement CURL
Would it be hard? Like, is it a lot of work for them and/or a security risk? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PEAR
This whole PEAR thing is really confusing. The sites documentation is crap compared to PHP. what is it and how do i install it on my windows system? and more, importantly do i have 2 force my host to install it or can i do it myself. i'm just looking to use the file_find package. they say pear is automatically installed with php4 but i cant seem to find it. -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PEAR] PEAR
oh, i thought there was supposed to be some software or stuff in the pear directory (which doesnt exist) so i just create one and put the package i downloaded into it, then add the line to php.ini and use it in my scripts. dats it? and i need no permissions to use the stuff on the server? i dont have to ask the admin to do anyhting for me? Martin Jansen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Wed, 3 Apr 2002 20:12:46 +0100, Georgie Casey wrote: The sites documentation is crap compared to PHP. I love to hear people critizing constructively. what is it and how do i install it on my windows system? Add the directory, where your PEAR code is located (e.g. c:\php4\pear), to include_path in your php.ini and you're done. and more, importantly do i have 2 force my host to install it or can i do it myself. i'm just looking to use the file_find package. Upload the desired package somewhere on your website and again add the location to your include_path. - Martin -- Martin Jansen, [EMAIL PROTECTED] http://www.martin-jansen.de/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] post request
i have to interact with a php script on a distance server through one of my scripts. i need to pretend i posted a form from my script... i understand there's 2 options. sockets and a PEAR thingy for HTTP POST n stuff. i was reading bout sockets in d php dev cookbook and its just really confusing. can any1 shed some light? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Exec command problems
when i try to execute a program, PHP just stalls there for ages, my page doesnt load or anything. the program is a dos pogram, i pass variables thru d command line and when the program runs it just returns 1 line of output and stops. WHATS D PROBLEM? btw, i first get PHP to write a text file and then get the program to open this text file and yes, i closed the file before trying to exec the program -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] DHTML Trouble please help
fix ure clock!! Erik Price [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Saturday, March 13, 2010, at 10:15 PM, Jennifer Downey wrote: I am no DHTML expert and don't even know the language also didn't know where to post this. But after today I am going to learn. Isn't DHTML more of a buzzword? i don't think it's really a language. It just refers to using scripting languages and plugins like JavaScript, Flash, CSS tricks, and even server-side manipulation to achieve an effect. There's a lot of stuff on this topic at http://dhtmlcentral.com/ if you're interested. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Random Selecting from mySQL
I know how to use the ORDER BY rand() command on the end of queries to randomize selection, but that's no good when you want to only display 10 results per page. The next page the user chooses, randomizes again and could show duplicate fields and not at all show other fields. Does anyone know a way round this? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] COOKIES QUESTION
do you have to delete cookies on the same level (directory) you created them? coz mine dont seem to be deleting -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] Random Selecting from mySQL
yea, i know how to display 10 results per page, but that doesnt work when you want to do a ORDER BY rand() query. Gurhan Ozen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... are you just looking for a way to display 10 results per page? If yes then you can just use LIMIT to limit your result to 10 .. So, for the first page, you can do SELECT LIMIT 1, 10; and for the second page SELECT ... LIMIT 11, 20 etc etc . You can sure use ORDER BY with LIMIT to to sort the results for a given criteria .. Gurhan -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 2:00 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Random Selecting from mySQL I know how to use the ORDER BY rand() command on the end of queries to randomize selection, but that's no good when you want to only display 10 results per page. The next page the user chooses, randomizes again and could show duplicate fields and not at all show other fields. Does anyone know a way round this? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpAdsNew
I'm getting loads of undefined variable errors with this script any1 know why? -- PHP General Mailing List (http://wwwphpnet/) To unsubscribe, visit: http://wwwphpnet/unsubphp
[PHP] phpAdsNEW HELP!!!!
I just download the 6.1 beta of phpAdsNew off sourceforge and installed it on my localhost. I set everything right but when I login to admin I get a undefined variable, $zoneid error from config.inc So I just added a global $zoneid; line and I half got into the admin page. But I'm still getting loads of these errors. The script is unusable because of all the errors. Does anyone know what the problem is? Could it be something to do with magic_quotes or something?? TIA -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpAdsNew
no, registerglobals has nothing to do with it Dl Neil [EMAIL PROTECTED] wrote in message 158e01c1c2fc$57b0db80$c200a8c0@jrbrown..">news:158e01c1c2fc$57b0db80$c200a8c0@jrbrown..; Georgie, I'm getting loads of undefined variable errors with this script. any1 know why? You're using a recent release of PHP aren't you? Check out http://www.php.net/manual/en/security.registerglobals.php for an explanation of changes in 4.1.n. Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] the date90 fucntions gone haywire!
the time stamp i'm giving its perfect! i echoed some already and there's no problem. i'm using the code: $time = date(d-m-y, $timestamp); the £timestamp i'm feeding its is perfect, with the year first, then month, date, etc... Dl Neil [EMAIL PROTECTED] wrote in message 077b01c1c0aa$7531dd20$c200a8c0@jrbrown..">news:077b01c1c0aa$7531dd20$c200a8c0@jrbrown..; Hi Georgie, The date() function is returning the 19th of Januray 2038 as *ALL* dates no matter what timestamp i feed it! whats goin on?? Result outside the UNIX epoch. Sounds like DATE()'s being fed some crazy data. What is the server's ToD clock showing? Make sure you debugECHO the source data before you feed it to DATE(). Post some code and results from the browser and we may be able to point fingers! Regards, =dn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] the date90 fucntions gone haywire!
The date() function is returning the 19th of Januray 2038 as *ALL* dates no matter what timestamp i feed it! whats goin on?? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Uploading Files through PHP
I'm trying to let users upload word files through a PHP form but its not working! The script keeps telling me that the file path doesn't exist. HERE'S THE CODE I USE IN THE FORM PAGE: FORM ENCTYPE=multipart/form-data ACTION=freelancers/uploaded_word.php METHOD=POST INPUT TYPE=hidden name=MAX_FILE_SIZE value=1000 p align=center input type=submit value=Upload name=submit input type=file name=wordcv size=30 /p /form is the code on the form page, when i submit i'm told the $wordcv is a null. WHY?? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems with Cookies
Rite, a user logs in at http://localhost/employers/login.php and PHP sets a cookie, eusername, that has his username, funnily enough. then he clicks on to the /employers/search.php, submits his query and clicks on the page of http://localhost/freelancers/some_guy/index.php When I have a bit of PHP code at the top of /some_guy/index.php that check if an employer is looking at this site. ? if ($eusername ){ do this; } ? But PHP keeps telling me that eusername IS equal to and no employer is logged in, when they're definately is. WHY?? Has it something to do with the scope of cookies?? Because when I check if eusername exists in a page in the employers directory, it works fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problems with Cookies
email me if you dont understand something about my question. I read it back to myself, and it all sounds so complicated! TIA Georgie Casey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rite, a user logs in at http://localhost/employers/login.php and PHP sets a cookie, eusername, that has his username, funnily enough. then he clicks on to the /employers/search.php, submits his query and clicks on the page of http://localhost/freelancers/some_guy/index.php When I have a bit of PHP code at the top of /some_guy/index.php that check if an employer is looking at this site. ? if ($eusername ){ do this; } ? But PHP keeps telling me that eusername IS equal to and no employer is logged in, when they're definately is. WHY?? Has it something to do with the scope of cookies?? Because when I check if eusername exists in a page in the employers directory, it works fine. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A MYSQL COUNTER
whenever they're is a new unique visitor, I want a script to email the member about who visited. And have a permanent record for each member of who viewed their pages, accesible when they login. Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The question you must answer first: what do you intend to do with the data once it's collected? Will you simply review the data without sorting it or performing data manipulation? If so, why incur the overhead of MYSQL? If all you need to do is log the user page hits, use a text file; then use grep/awk/sed/perl/php to search for specific users with their page hits, etc. Define your requirements more explicitly, then choose a solution. -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 6:39 PM To: Georgie Casey; [EMAIL PROTECTED] Subject: RE: [PHP] A MYSQL COUNTER This is too much for a text file. You should definitely use MySQL for this. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] A MYSQL COUNTER I need a way of tracking what user was logged in when vieweing a particular member page, so I'm thinking of having EVERY unique page view of each member page added to a MySQL database, which just the ip, time and date, server name and browser, stuff like that. Is this too much for a MySQL DB??? Should I just write all the info to a textfile??? TANX -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] A MYSQL COUNTER
yea, I'm going to use MySQL for it. Tanx Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I just looked at your website (http://www.filmfind.tv) to get a better feeling for what you might be after. Based upon your comments below and the purpose of filmfind.tv, it appears a mysql solution might be required. At the least, you need to store the email address of your members. I assume you already have that stored elsewhere. Second, the requirement for new unique visitor is the phrase that pays here. You will need to maintain a list of visitors and search that list to determine uniqueness. A database would be the fastest to develop. As to whether your application is too much for MYSQLworry not. There are MYSQL DBs out there with millions of rows and very complex relational structures. -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] A MYSQL COUNTER whenever they're is a new unique visitor, I want a script to email the member about who visited. And have a permanent record for each member of who viewed their pages, accesible when they login. Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The question you must answer first: what do you intend to do with the data once it's collected? Will you simply review the data without sorting it or performing data manipulation? If so, why incur the overhead of MYSQL? If all you need to do is log the user page hits, use a text file; then use grep/awk/sed/perl/php to search for specific users with their page hits, etc. Define your requirements more explicitly, then choose a solution. -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 6:39 PM To: Georgie Casey; [EMAIL PROTECTED] Subject: RE: [PHP] A MYSQL COUNTER This is too much for a text file. You should definitely use MySQL for this. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] A MYSQL COUNTER I need a way of tracking what user was logged in when vieweing a particular member page, so I'm thinking of having EVERY unique page view of each member page added to a MySQL database, which just the ip, time and date, server name and browser, stuff like that. Is this too much for a MySQL DB??? Should I just write all the info to a textfile??? TANX -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Search Page
I'm making a search page on my site where users enter certain criteria and I ouput the results like many other webistes: By first telling how many results were generated, then having dynamic pages to view, say, 10 results at a time. So first I have to SQL the database to get totalresults, then cancel that query and query again with a LIMIT tag on the end to display the first 10 results. Is there a more efficient way of doing what I'm trying to do? I coded it myself so its probably poor, design-wise. Am I going about it the right way? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Writing PHP files from inside a PHP file
yea, evals() exactly what i needed, tanx J Smith [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... include() and require() were suggested, but you may also want to look into eval(), which parses a string as PHP code and returns the parsed PHP. Sounds like what you're looking for. (I.e. storing PHP code in a database, right?) J Georgie Casey wrote: I want to extract information from a database table and create a half-static, half-dynamic PHP page from the info. I want to store the template for the new page in an external file with tags in the places where I want variables to be printed. What;s the best of achieving this?? I tried fread but that just printed ? echo $variable; ? to the static page instead of replacing it with the value. Any suggestions? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Writing PHP files from inside a PHP file
I want to extract information from a database table and create a half-static, half-dynamic PHP page from the info. I want to store the template for the new page in an external file with tags in the places where I want variables to be printed. What;s the best of achieving this?? I tried fread but that just printed ? echo $variable; ? to the static page instead of replacing it with the value. Any suggestions? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Check Boxes and updating records. (HELP ME....)
OK, I've a page for my users to sign up on my website and in the form, there's a few checkboxes fields. So I set the name of the check boxes as name[] and PHP made an array of all the options choosen. All the check boxes values are numbers, so I got all the numbers from the array, put a comma between them all and inserted them as one field in my database. Easy. It worked well. But now I've a problem. I want to give users the option of changing their details when they log into the site. So I get the form and put ?php echo $variable_name; ? in every text box so the user sees their record. I had a small problem with showing choosen values in dropdown lists and radio options but i solved them both. But I cannot think of any way to show what check boxes were choosen by the user. Could anyone help me? PLEASE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Tar and GZIP functions
I want users to be able to select files from a folder and then a php script would wrap em up in a tar file. Can zlib funtions do this? the files are small gifs, if that helps tia -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MySQL question
I have a table set as auto_update for the primary ID field, but sometimes the PHP script adds fields which don't fill up all of the ID numbers, as I delete a few records manually. is there any way to ensure all primary id field nos. are filled up is this a potential problem -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]