[PHP] Query Returning Error
Morning all. this is such a basic question I'm embarrassed to ask but the query worked fine a few minutes ago and now returns an error: I get an error: Parse error: parse error, unexpected '=' in sample.php on line 2 [CODE] // Authenticate User: Query01 = SELECT * FROM Users WHERE UserID='$_POST[TXT_UserID]' AND UserPassword='$_POST[TXT_UserPassword]'; $Result01 = mysql_query($Query01) or die(Error 01: . mysql_error()); [/CODE] WTF...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query Returning Error
Doh...! thanks mate. -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wednesday 13 October 2004 15:32, Harlequin wrote: this is such a basic question I'm embarrassed to ask but the query worked fine a few minutes ago and now returns an error: Change everything back to what it was a few minutes ago? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Murphy was a grunt -- Murphy's Military Laws n56 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: php and print
I'm also using Hypertext Mark-up Language and Hypertext Pre-processor but hey - who cares about the TLAs...? -- - Michael Mason Arras People www.arraspeople.co.uk - Raditha Dissanayake [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Bruno I'm still rather new to PHP so I use client side Java: you are not using java you are using javascript. [CODE] !-- Print Page -- pClick Here To Print This Page: a href=javascript:window.print()img src=../images/Icon_Printer.gif border=0 alt=Print This Page/a/p [/CODE] That may be os use to you... -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php and print
Bruno I'm still rather new to PHP so I use client side Java: [CODE] !-- Print Page -- pClick Here To Print This Page: a href=javascript:window.print()img src=../images/Icon_Printer.gif border=0 alt=Print This Page/a/p [/CODE] That may be os use to you... -- - Michael Mason Arras People www.arraspeople.co.uk - Bruno Santos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. Is possible to php to send information to the printer, or just print the page i want in the browser and is the user who press the print button ?? does php have any printing functions ?? cheers Bruno Santos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: simple date/now() question
I gave up with the timestamp feature because although it's accurate it's not English and needs to be reworked to make it presentable. Despite finding code to do this I still moved on to using a date\time stamp using the US format of-course and this echoes much easier and will of-course be easier to perform calculations on. Hope that helps some... -- - Michael Mason Arras People www.arraspeople.co.uk - Mag [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have a field in the db called join_date_time(timestamp 14) which has data like: 20040928170708 20040916163619 etc This keeps track of the customer join date, I need to know if the client has joined in the last 24hrs or more than 24hrs back... Anybody have a function for this? or can help? am a bit confused because reading on google I see that there are 2 possible problems as MySql has its own time and PHP its own time (most of the time!) Thanks, Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Searching My Database
Morning everyone. I've read around the subject of searching and although using the FULLTEXT capability of MySQL might be the proper way of doing this I feel it's somewhat limited and have decided to use a simple select procedure. I'm sure there's a better way of doing this, as I'm quite new to MySQL and even newer to searches, However - here's my conundrum: I'm declaring variables at the top of my query like so: Code: $WorkPermit == ' . $_POST[WorkPermit] . '; And then execute the query like so: Code: SELECT * FROM MembersData WHERE `Work_Permit_Rqd` LIKE '$WorkPermit' But I have many other fields that the searcher can use. What do I do if they leave this field blank...? I appreciate that I should be using the MATCH function but I'm not entirely happy with the way it searches. What I need to do is actually omit a field (s) from the search if the value the searcher submitted was NULL. For example: Search field X and Y and Z and if x or Y are null continue... Am I explaining this OK...? Any suggestions gratefully received. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Match Vs Where - Fulltext Search
Hi all. It took me some time to discover that you can't use a MATCH | AGAINST statement unless you create an fulltext index of the fields to search at the same time. Strange, I know. What's more strange is that as I read more I wonder why people use it because it will only seartch complete words, will not search on words that are 3 characters or less, treats hyphenated words as seperate words and has a whole long list of excluded words. OK, so I'll use the following: [code]$query = SELECT * FROM MembersData WHERE `UserID` LIKE '$Keyword01' or `UserID` LIKE '$Keyword02' or `UserID` LIKE '$Keyword03' or `UserID` LIKE '$Keyword04' or `UserID` LIKE '$Keyword05'; $Data = mysql_query($query) or die(Error 1: . mysql_error());[/code] But the only problem I see with this is that although it allows me to search using wildcards and partial words it seems a very lengthy way of completing the task because I think I would have to repeat this statement with something like OR WHERE for each field I wanted to search. I know this post is lengthy and I apologise for putting you to sleep but I'd really love to get to the bottom of this one sometime soon. Has anyone else experienced similar frustrations searching their databases - I can't be the only one...! -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem with uploaded file
Sagar This is the code I use to change file permissions on a file that has been uploaded by a user to a predefined area with a predefined filename: // Change File Permissions: chmod({$uploadfile}, 0644); -- - Michael Mason Arras People www.arraspeople.co.uk - Sagar C Nannapaneni [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello folks, I'm facing some sort of problem here. I'm uploading a file from the clients system to the server. Everything working fine except that the file that is being uploaded is having a file permission of 600 ie only read and write to the owner only. So i'm not able to change the permissions (either with some ftp client or thru the file manager on the server) nor am i able to download the file even. Is there any way that i can set permissions to the files that are being uploaded.?? here is the code is used... $uploaddir = './photos/'; print pre; $arr_basename=explode(.,$_FILES['userfile0']['name']); $file_type=$arr_basename[1]; $nameofphoto=$profileid.1..$file_type; @move_uploaded_file($_FILES['userfile0']['tmp_name'], $uploaddir . $nameofphoto); $uploaddir = './photos/'; print pre; $arr_basename=explode(.,$_FILES['userfile1']['name']); $file_type=$arr_basename[1]; $nameofphoto1=$profileid.2..$file_type; @move_uploaded_file($_FILES['userfile1']['tmp_name'], $uploaddir . $nameofphoto1); $uploaddir = './photos/'; print pre; --- plzz help me out.. /sagar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parsing a File
Hi all. I've been through the PHP manual and wonder which file option will best suit my needs. I basically want to take a file that the user uploads and parse it into a variable or string so I can insert it into a field in my database. Do I use: File() file_get_contents Or something else...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Creating Dropdown Menus From Tables
Hi all. Hoping this might be relatively easy... I'm wondering if I can create a dropdown menu (optionABCDE/option) by using a select statement and then populating this using PHP...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie: Validate Required Form Fields
Francis I have a new web app that does exactly that. Page one has some mandatory fields. Page 2 checks these fields and tells the user to go back if they aren't complete. If they are complete then they are presented with page 2 and the fields it holds. -- - Michael Mason Arras People www.arraspeople.co.uk - Francis Chang [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello All, I have a newbie question related to validating required Form fields. Suppose we have a two-step user registration process with scripts register1.php and register2.php, each page containing a set of required and non-required fields. In register1.php, when user submits the form, it calls register2.php as the action. In register2.php, I want to validate the Form values submitted by the user in register1.php and if any of the required fields is missing a value, I want to re-dispaly the register1.php page with the appropriate error message. What is the most appropriate way to handle this? Once the validation fails in register2.php, can I call register1.php with parameters? If so, how? Or do I use session variables to capture the error information? How do I redirect to register1.php from within the code execution of register2.php? Thanks in advance for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Load Data Local Infile
I am using the following command and it appears to execute but does not actually load any data: LOAD DATA LOCAL INFILE 'public_html/CSV/act-export.csv' INTO TABLE MembersData FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; Any ideas what I might be missing...? The file exists, and I must have the path right or would get an error but still no joy unfortunately... -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Load Data Local Infile
Dark forces indeed...! OK, OK... Now I have got it working using a local file on the HDD. Next - integration with PHP: using the following syntax: $Upload= LOAD DATA LOCAL INFILE '/public_html/CSVFILENAME.CSV INTO etc does not seem to work and provides no error even though I'm trapping any. I have a commend that changes the file permissions to read only ALL but still no joy. If I use a local file, fine such as C:\CSVFILENAME.CSV but not the above path (and I checked, the file's actually there sitting and waiting). Strange. Any ideas guys...? -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am using the following command and it appears to execute but does not actually load any data: LOAD DATA LOCAL INFILE 'public_html/CSV/act-export.csv' INTO TABLE MembersData FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; Any ideas what I might be missing...? The file exists, and I must have the path right or would get an error but still no joy unfortunately... -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Broken data within an Array
while($result = mysql_fetch_array($query)) { $DateAdvertised=$row[DateAdvertised]; does that help any o would you like all the code...? -- - Michael Mason Arras People www.arraspeople.co.uk - Comex [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What is $result? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Broken data within an Array
Following the query I have this: ?php while($result = mysql_fetch_array($query)) { $DateAdvertised=$row[DateAdvertised]; $DateAdvertisedBroken = explode(-, $DateAdvertised); Then a little while later this: $DateAdvertisedBroken[2]-$DateAdvertisedBroken[1]-$DateAdvertisedBroken[0] which returns nothing, but should as $DateAdvertised does... :| -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all. Having a problem echoing a broken date. Here's where I'm at: $DateAdvertisedBroken = explode(-, $DateAdvertised); later, in a table, I use: $result[DateAdvertised] How can I change this so I can call the broken date...? I've tried datebroken [2] etc but no joy. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Broken data within an Array
Hi all. Having a problem echoing a broken date. Here's where I'm at: $DateAdvertisedBroken = explode(-, $DateAdvertised); later, in a table, I use: $result[DateAdvertised] How can I change this so I can call the broken date...? I've tried datebroken [2] etc but no joy. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: List of cities
I scoured the web. begged borrowed and stole and eventually ended up with a list of over 1,600 cities and towns in the UK. -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Morning... Does anyone know of a site that or resource available where I could pull a list of ALL UK cities and towns for an option list...? I started out with 100+, then expanded this list to over 200 but still get complaints that certain towns are not listed. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Broken data within an Array
Jason Thanks for the response. I have this: $DateAdvertised=$row[DateAdvertised]; $DateAdvertisedBroken = explode(-, $DateAdvertised); So I can easily use this in my table: $result[DateAdvertised] But not this for some reason: $DateAdvertisedBroken[n] Any ideas...? -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Hi all. Having a problem echoing a broken date. Here's where I'm at: $DateAdvertisedBroken = explode(-, $DateAdvertised); So this contains an array of (year, month, day) or something similar? You should be able to grab the values here if that's the case. later, in a table, I use: $result[DateAdvertised] How can I change this so I can call the broken date...? implode(' ', $DateAdvertisedBroken) or use nbsp; if needed. Or did you mean $DateAdvetisedBroken[2] ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] List of cities
Morning... Does anyone know of a site that or resource available where I could pull a list of ALL UK cities and towns for an option list...? I started out with 100+, then expanded this list to over 200 but still get complaints that certain towns are not listed. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Exporting Dbase to CSV
I've seen many different posts on this subject and try as I might I can't get my data to output to CSV for a user to save. I can output to a table, I can output to screen in CSV format but that just means massing about with copy and paste. Has anyone got any suggestions...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Exporting Dbase to CSV
I'm using MySQL Jay I can present the results in a table easy enough and if I replace the TD TAGs with commas etc. I get a screen output that resembles a CSV file but need to go that one step further and don't know how... -- - Michael Mason Arras People www.arraspeople.co.uk - Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I've seen many different posts on this subject and try as I might I can't get my data to output to CSV for a user to save. I can output to a table, I can output to screen in CSV format but that just means massing about with copy and paste. Has anyone got any suggestions...? [/snip] What, exactly, do you mean? A CSV file that resembles a spreadsheet? A doc with CSV? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Exporting Dbase to CSV
I'm using MySQL Dan I can present the results in a table easy enough and if I replace the TD TAGs with commas etc. I get a screen output that resembles a CSV file but need to go that one step further and don't know how... -- - Michael Mason Arras People www.arraspeople.co.uk - Dan Joseph [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Depending on which database you're using, there is the UNLOAD function. Do a google for it, should find the answers. I've seen many different posts on this subject and try as I might I can't get my data to output to CSV for a user to save. I can output to a table, I can output to screen in CSV format but that just means massing about with copy and paste. Has anyone got any suggestions...? -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Outfile not working
Morning all. I've been tinkering with the code for the above for some time now and keep getting the same error: Access Denied... Can anyone help me find a solution to this as the user in question has full privileges to the database so I assume it's a directory access issue... -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: back button doesn't work with sessions?
Frank I use a back button on a couple of sites that use session variables and don't seem to have an issue with them. However, my back buttons are held within IFRAME tags as I am accessing resources externally. -- - Michael Mason Arras People www.arraspeople.co.uk - Frank Keessen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all! Can you please help me with the following; I've got a form (that comes in 'three parts' a1.php a2.php and a3.php)with sessions that refuses to go back! On A2.php and A3.php i made a back button like: input type=image src=images/back_button.jpg onClick=history.back() and input type=image src=images/back_button.jpg onclick=history.go(-1) And i've added the follwing line directly after Session_start(); header(Cache-control: private); When i'm hitting the back button it's stays on it's page!!! So no browser back for me! Can somebody help? Thanks! Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP MySQL Installation
Hi all. I'm probably biting off a little more than I can chew here but here goes... I've been asked to move some resources I have developed from our hosting company's server and host them locally. I know I am going to need a licence for MySQL as we are developing commercial applications and not prepared to release the source code but will we need a licence for PHP...? Also... What flavour of Linux do these sit best on...? Mandrake has been recommended but I am open to suggestions... -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] System Tray Icon
Hi all. I just wanted to throw this message in here and get some opinions before I go off developing something So will post in the correct newsgroup later (when I find which newsgroup I need). Before I post a more thorough thread in the correct area I just wanted to find out if this was achievable and what tools I'd need. Basically: I would like to drop a system tray icon onto the user's PC that links them to a website. I'd also like to develop a separate one that flashes when a page is changed. How difficult would this be to do...? Would it mean using VB, could I use something less expensive perhaps or is it just not possible at all...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RIP Programming
I know, I know. This is a PHP newsgroup. I just wondered if anyone knew of any RIP newsgroups as I can't seem to find any, or any forums... -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] If Else Syntax Incorrect (I Think)
Can someone help with this please...? if( strlen( $UserID ) != 0 strlen( $UserPassword ) != 0 strlen( $SecretPassword ) != 0 strlen( $UserMail ) != 0 ) { Do something } elseif ( strlen( $UserID ) == 0 or strlen( $UserPassword ) == 0 or strlen( $SecretPassword ) == 0 or strlen( $UserMail ) == 0 ) { Do Something else } -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] weird error, might be javascript?
I have had similar problems in the past Angelo and viewing the source of the HTML file usually helps identify and localise the problematic line. -- - Michael Mason Arras People www.arraspeople.co.uk - John Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Angelo Zanetti wrote: I have been working on a pretty big project over the last couple of months and then all of a sudden I started getting errors in my browser, the error in the bottom left corner with the yellow icon. anyway Im not sure what causes these errors. It says that it expects a ) on line 597 of that page. That's a JavaScript error. Look at line 597 of the HTML source, not the PHP source, to find the error. -- John Holmes php|architect - The magazine for PHP professionals - http://www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Changing MySQL Date Format
I'm using a hell of a lot of dates in my databases and wondered if it was possible to change the date format in my databases from -00-00 to: 00-00-...? Has anyone else managed to do this or use any workarounds I could use perhaps...? I'm just getting a little hacked of having to explode the damn things every time I use them. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Creating plotted graphs on the fly
Ryan I'm looking to do the same thing later down the line. I'd appreciate you keeping in touch by mail and perhaps we can help each other out on this one...? -- - Michael Mason Arras People www.arraspeople.co.uk - Ryan C . Spaulding [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I wanted to know if there is way with PHP to take a bunch of data points and create a plotted graph image (jpg, gif or png). The data points would be inputed into a web form and then the data points would be plotted on a graph once the user submitted the information. Any help would be appreciated. Thank you, Ryan Spaulding -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: MySQL PHP Examples Training Providers Required
Jay, guys. Thanks very much for all your responses on this issue. I'm sorry if I don't always reply through the group but if I am working from the office I have a problem connecting to the mailing list. which is just one of the reasons I prefer working from home. I, along with your help, have instilled some level of confidence in the languages I am using within my colleagues here at work. even though I am knew, I am no newbie to programming and designing databases and knew that PHP and MySQL would be up to the job. I'm particularly interested in what you are doing with them Jay. I was very surprised to see how many record manipulations your system manages on a daily basis - maybe one day eh...? again: thanks very much :) -- - Michael Mason Arras People www.arraspeople.co.uk - Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] On Wed, 11 Aug 2004 18:20:23 -0400, Lukasz Karapuda [EMAIL PROTECTED] wrote: Why I chose to reply to your email is because PHP is not usually used for the development of more complex functionality like the Web site module that we have developed. I beg to differ. Many large and complex sites are written in PHP. There are also many large and complex programs written in PHP which are in production use. Take TYPO3, for example: http://www.typo3.org I'll second that, PHP is an excellent choice for website development - especially when supported by the correct web server and database ;) [/snip] I'll third this. Extremely complex applications are programmed using PHP. I responded off list to Michael about this, but we are using PHP to process and report on millions of records per day in MySQL databases. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL PHP Examples Training Providers Required
Hi all. This might sound like a strange request but here goes. I'm looking for some examples of sites that are purely MySQL and PHP running on Unix and that contain a few thousand records preferably held in relational databases. Rationale: I need to justify PHP as a tool of choice over say vb.net or Oracle. My recommendation, despite my limited knowledge of MySQL and PHP is that even if we have 10-15 databases holding upwards of 10,000 records each PHP and MySQL are the tools of choice and I doubt that there are any functions missing that you'd find in VB.Net. I could be wrong and if so, please let me know. My other question is that I am looking for training in the UK, preferably in the North. I have no idea about accreditation or certification requirements and wondered if anyone could provide any recommendations...? Thanks for your time guys. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Variable just not Behaving Itself.
I have the following: [SNIP] ... $Emp_Status_Rqmt=$row[Emp_Status_Rqmt]; } if( $Emp_Status_Rqmt == 'Permanent' ) { $UserStatus = 'Permanent'; } if( $Emp_Status_Rqmt == 'Contractor' ) { $UserStatus = 'Contractor'; } else { $UserStatus == 'Flexible'; } [SNIP] which echoes OK until I change the value to something other than Permanent or Contractor. It simple echoes resource ID #n what's wrong with me...? the code I mean...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Outputting Data
Jay. Strange behaviour. My ISP seems to allow me to download messages intermittently but can reply to all anytime I like. However, If I can't download I can bloody well reply. Guess who the ISP is...? NTL...! I'm talking to my ISP about directory access, seems the problem with outputting that file resides there mate. thanks again. :) -- - Michael Mason Arras People www.arraspeople.co.uk - Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I will post replies to the list once I can access it - for some reason my ISP is crap. [/snip] Your Reply To All doesn't work on your e-mail client? [snip] I think the problem resides with directory access which I am sorting out right now. [/snip] Let me know, I am glad to help if I can. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Outputting Data
It appears that I am unable to output the data to a directory because although my user has sufficient privileges on the database to execute the query the user in question does not have file privileges. As I am reliant on my host I'm looking for other ways to achieve this. Could I possibly set a prompt for downloading the file...? If so, how...? Or could I echo to screen and copy and paste...? I'm looking for a better solution than that last brain fart though. Ideally a download option but although I have scoured the web cannot seem to find anything specifically related to downloading a CSV output from MySQL. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unable to Destroy Session
Morning guys. I'm trying to destroy a session using session_destroy(); and I get the following error: Trying to destroy initialised session I simply want a user to click a logout button that destroys the session cookie. Am I doing this the right way...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Unable to Destroy Session
Sorted it. for some reason it was holding the session because I had two browser windows open which is the environment it will be used in by the users. strange though... -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Morning guys. I'm trying to destroy a session using session_destroy(); and I get the following error: Trying to destroy initialised session I simply want a user to click a logout button that destroys the session cookie. Am I doing this the right way...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Query Results Question
I have the following query which should return just two rows: SELECT 'ID', 'Vacancy Role', 'Vacancy Salary', 'Vacancy Location', 'Vacancy Type' FROM vacancy_details WHERE Publish = 'Yes' As only two rows have Publish set to Yes. yet even if I execute the query through phpMyAdmin I get two rows with field headings as field values. Any suggestions on where I'm going wrong...? I'm pretty sure my query syntax is accurate as I've used this type of query many times before and have even checked the syntax by using a query window. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query Results Question
Richard Thanks firstly for your help. I renamed the fields so the spaces are underscores and amended your query but still receive an error: not a valid MySQL result resource Still tinkering though... -- - Michael Mason Arras People www.arraspeople.co.uk - Richard Bewley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Take the spaces out of your field names, and then use this: ?php $query = mysql_query(SELECT id,vacancy_role,vacancy_salary,vacancy_location,vacancy_type FROM vacancy_details WHERE Public='yes'); while($result = mysql_fetch_array($query)) { echo $result[id] - $result[vacancy_role]; } ? - Thank you, Richard Bewley [EMAIL PROTECTED] Equinox Systems and Development Website: http://www.eq-dev.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query Results Question
Richard. Public. I changed it to Publish. But if I use a query window to interrogate the database I still get just two rows using the following query with field names not values for the row cell contents: SELECT 'ID','Vacancy_Role','Vacancy_Salary','Vacancy_Location','Vacancy_Type' FROM vacancy_details WHERE Publish='Yes' -- - Michael Mason Arras People www.arraspeople.co.uk - Richard Bewley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Richard Thanks firstly for your help. I renamed the fields so the spaces are underscores and amended your query but still receive an error: not a valid MySQL result resource Still tinkering though... Can you paste me a.) Your database structure b.) The exact query you are using Also, you may want to do $query = mysql_query(SELECT * from vacancy_details) or die(mysql_error()); I don't care about the first part of that, but try putting in the mysql_error() in the form I used above, and see if it gives you any other information. - Thank you, Richard Bewley [EMAIL PROTECTED] Equinox Systems and Development Website: http://www.eq-dev.com/ Also, please look at our webhosting services, specializing in business web hosting starting from $15 per month! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query Results Question
I'm only selecting a few fields Richard as I want to try and drop them into an array and display in a table. I know I'm probably going the long way around doing this but I need to learn from scratch exactly how to do it. I appreciate your help and patience very much. I've managed to get the query returning some results now. An array. I'm going to have to spend a little, well actually quite a bit, of time now working out how to present these in a table. I assume a for statement will get me pointing in the right direction...? -- - Michael Mason Arras People www.arraspeople.co.uk - Richard Bewley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Richard. Public. I changed it to Publish. But if I use a query window to interrogate the database I still get just two rows using the following query with field names not values for the row cell contents: SELECT 'ID','Vacancy_Role','Vacancy_Salary','Vacancy_Location','Vacancy_Type' FROM vacancy_details WHERE Publish='Yes' Take out the quotes. Make your query say: SELECT ID,Vacancy_Role,Vacancy_Salary,Vacancy_Location,Vacancy_Type FROM vacancy_details WHERE Publish='Yes'; Also, if you are selecting every field, then why not do a SELECT *? - Thank you, Richard Bewley [EMAIL PROTECTED] Equinox Systems and Development Website: http://www.eq-dev.com/ Also, please look at our webhosting services, specializing in business web hosting starting from $15 per month! -- - Michael Mason Arras People www.arraspeople.co.uk - Richard Bewley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Richard Thanks firstly for your help. I renamed the fields so the spaces are underscores and amended your query but still receive an error: not a valid MySQL result resource Still tinkering though... Can you paste me a.) Your database structure b.) The exact query you are using Also, you may want to do $query = mysql_query(SELECT * from vacancy_details) or die(mysql_error()); I don't care about the first part of that, but try putting in the mysql_error() in the form I used above, and see if it gives you any other information. - Thank you, Richard Bewley [EMAIL PROTECTED] Equinox Systems and Development Website: http://www.eq-dev.com/ Also, please look at our webhosting services, specializing in business web hosting starting from $15 per month! -- 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] Query Results Question
Curt. Thanks for the pointer and yes, I should be doing that and overlooked it this time. It's working now as I seem to be echoing the second record in the table and will plug away at getting the table defined. Thanks for all your help Curt. -- - Michael Mason Arras People www.arraspeople.co.uk - Curt Zirzow [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] * Thus wrote Harlequin: Richard Thanks firstly for your help. I renamed the fields so the spaces are underscores and amended your query but still receive an error: not a valid MySQL result resource Still tinkering though... All this tinkering and database schema's are simply the long way around things. Just use mysql_error() after you query. mysql_query($sql) or die(mysql_error()); You'll know exactly whats wrong. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query Results Question - Solved
Many thanks Richard. I have the table presenting neatly now, thanks for all your help with this one...! -- - Michael Mason Arras People www.arraspeople.co.uk - Richard Bewley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm only selecting a few fields Richard as I want to try and drop them into an array and display in a table. I know I'm probably going the long way around doing this but I need to learn from scratch exactly how to do it. I appreciate your help and patience very much. I've managed to get the query returning some results now. An array. I'm going to have to spend a little, well actually quite a bit, of time now working out how to present these in a table. I assume a for statement will get me pointing in the right direction...? You are correct that the mysql_fetch_array will return an array which you can format into a table. You can use a while loop if you would like, which is probably the simplest. ?php $query = mysql_query(SELECT ID,Vacancy_Role,Vacancy_Salary,Vacancy_Location,Vacancy_Type FROM vacancy_details WHERE Publish='Yes'); echo table cellspacing=\4\ cellpadding=\4\ width=\50%\\n; echo trtdbID:/b/tdtdbVacancy Role:/b/tdtdbVacancy Salary/b/tdtdbVacancy Location/b/tdtdVacancy Type/b/td/tr\n; while($result = mysql_fetch_array($query)) { echo trtd$result[id]/tdtd$result[Vacancy_Role]/tdtd$result[Vacancy_S alary]/tdtd$result[Vacancy_Location]/tdtd$result[Vacancy_Type]/td /tr\n; } echo /table; ? - Thank you, Richard Bewley [EMAIL PROTECTED] Equinox Systems and Development Website: http://www.eq-dev.com/ Also, please look at our webhosting services, specializing in business web hosting starting from $15 per month! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Query Results Question - Solved
I know what's going to happen though Richard. I'll dump it in their site and it'll look terrible because they don't know how to use CSS effectively. But hey - that's part of the fun. Hyperlinks tomorrow though :| -- - Michael Mason Arras People www.arraspeople.co.uk - Richard Bewley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Looks good :) - Thank you, Richard Bewley [EMAIL PROTECTED] Equinox Systems and Development Website: http://www.eq-dev.com/ Also, please look at our webhosting services, specializing in business web hosting starting from $15 per month! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php coding software
Brad I use HTML-Kit for HTML, ASP, Java, CSS, PHP and MySQL. Free too :) -- - Michael Mason Arras People www.arraspeople.co.uk - Brad Ciszewski [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does anyone know any good software for PHP/mysql coding? I currently use DreamWeaver MX, however it doesn't have much PHP support, and no MySQL support. I just want an easy program to script in, and upload on to my webserver. Please help! :o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Replace a button by an image
Henri. I prefer to use CSS for things like this but I'm sure PHP has it's own idiosyncrasies. I checked out the site posted in response to your post and personally thought the graphics were a bit ropey. typically CSS is used for replacing images or backgrounds on hover but is very flexible and quick to load an alternate image but it could just as easily be applied to static images such as buttons etc. Feel free to drop me a line if you need any pointers. -- - Michael Mason Arras People www.arraspeople.co.uk - Henri marc [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Is it possible to replace a button by an image with PHP? Thanks! Dave Vous manquez d'espace pour stocker vos mails ? Yahoo! Mail vous offre GRATUITEMENT 100 Mo ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Conversion of Field Value to Hyperlink
Afternoon... I have a table generated by some code that returns certain field values and drops them into a table. On of these values is ID and I'd like to convert it to a hyperlink that people can use to go to another page to view further information about a record. However: The fields are not individually identified as I use a for statement and I think I might need to redesign the table but don't know where to start. Can anyone provide any pointers please...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Conversion of Field Value to Hyperlink
RTFM...? -- - Michael Mason Arras People www.arraspeople.co.uk - Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I have a table generated by some code that returns certain field values and drops them into a table. On of these values is ID and I'd like to convert it to a hyperlink that people can use to go to another page to view further information about a record. However: The fields are not individually identified as I use a for statement and I think I might need to redesign the table but don't know where to start. Can anyone provide any pointers please...? [/snip] RTFM. If I need a hyperlink I have to code it even in a loopi.e. ?php while($remi = mysql_fetch_object($dbemi)){ print(tr\n); print(td . $remi-bellname . /td\n); print(tda href=\batch.crm.php?bn= . $remi-niiname . \ . $remi-niiname . /a - click for batch report/td\n); print(td align=\right\ . number_format($remi-bellcount, 0, '', ',') . /td\n); print(td align=\right\ . $remi-statdate . /td\n); print(/tr\n); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Conversion of Field Value to Hyperlink
I know. Just wondered if Jay had the courage of his convictions. -- - Michael Mason Arras People www.arraspeople.co.uk - John Nichel [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: RTFM...? AKA : Read The F**king Manual -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Conversion of Field Value to Hyperlink OT
Jay I am new. we all are at something at some point or other in our lives. If you don't like me fine - just ignore me. If you want to help, that's fine also. Just be polite. You don't need to swear to get your point across and don't need to be aggressive as either method implies a lack of control on your part and losing control is not what helping is about. and Jay. Have a great day :) -- - Michael Mason Arras People www.arraspeople.co.uk - Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] Just wondered if Jay had the courage of his convictions. [/snip] Yes I do...I showed incredible restraint because I could have said STFW and STFA too. Courage of my convictions indeed, are you new here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Conversion of Field Value to Hyperlink
Mmmm... Interesting Jay. Maybe I'll just WTFM mate :) -- - Michael Mason Arras People www.arraspeople.co.uk - Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I have a table generated by some code that returns certain field values and drops them into a table. On of these values is ID and I'd like to convert it to a hyperlink that people can use to go to another page to view further information about a record. However: The fields are not individually identified as I use a for statement and I think I might need to redesign the table but don't know where to start. Can anyone provide any pointers please...? [/snip] RTFM. If I need a hyperlink I have to code it even in a loopi.e. ?php while($remi = mysql_fetch_object($dbemi)){ print(tr\n); print(td . $remi-bellname . /td\n); print(tda href=\batch.crm.php?bn= . $remi-niiname . \ . $remi-niiname . /a - click for batch report/td\n); print(td align=\right\ . number_format($remi-bellcount, 0, '', ',') . /td\n); print(td align=\right\ . $remi-statdate . /td\n); print(/tr\n); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Retrieving Stored Values for Dropdown Menu
Hi all. I'm trying to retrieve values from a previously selected dropdown menu. For text I simply use value=$Whatever But for dropdowns I can't do this - has anyone else come across this before...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Retrieving Stored Values for Dropdown Menu
OK David. But here's the conundrum: a User has already selected a value which is stored in the database. Can I Display a range of option tags but make the one the user selected previously as the default...? ??? -- - Michael Mason Arras People www.arraspeople.co.uk - David Robley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wed, 28 Jul 2004 20:49, Harlequin wrote: Hi all. I'm trying to retrieve values from a previously selected dropdown menu. For text I simply use value=$Whatever But for dropdowns I can't do this - has anyone else come across this before...? Surprisingly, yes. If the dropdown has multiple selections, name it as an array - listoptions[] -- David Robley I get mail I exist. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Retrieving Stored Values for Dropdown Menu
I ended up with this: option selected?php echo $Variable; ?/option Can you see any obvious problems I might miss.? -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all. I'm trying to retrieve values from a previously selected dropdown menu. For text I simply use value=$Whatever But for dropdowns I can't do this - has anyone else come across this before...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Retrieve The Last Record in a Table
Thanks for that Jason Any suggestions on how I would retrieve the next to last entry...? The last time prior to this session that the user logged in...? -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Davidson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] as mentioned already, use a column in the table to order the query and then use LIMIT to only to return one record. Best columns to use would be an auto_increment or a datetime field type. Jason On Mon, 26 Jul 2004 18:27:25 +0100, Harlequin [EMAIL PROTECTED] wrote: I would like to retrieve the last entry in a login table and present that to a user so they can verify the date we have when they last logged in. Is this possible...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- 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] Verifying AUthorised Users through Session Variables not Working...?
Hi all. I'm using session variables to identify if a user is authorised, if yes - display x and so on. However, I've come across a couple of issues: when users access a page that's 2 folders deep into the root I.e. www.mydomain.com/folder1/folder2 any include references I use have to be absolute instead of relative, has anyone else come across this...? Also: users are not being authorised even though there's a variable that says they are. I have verified this by placing a file in folder1 and it displays fine but if I click a link to access a file in foder2 I get a login page - I shouldn't. Any ideas...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Usng Session Vaiable in WHERE Statement
Could someone please help me with my syntax here...? $MembersDataQry = SELECT * FROM MembersData WHERE UserID='$_SESSION['logname']'; I get an error on line 2 but can't seem to figure out what I've missed. The variable echoes fine so I know there's a string in there. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creation of MySQL Database Using PHP
Marek thanks very much. -- - Michael Mason Arras People www.arraspeople.co.uk - Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Hello. I have a friend who knows less than me about PHP and MySQL (which I know is hard to believe) but she needs a login facility for her site. I've passed over some script I use but she doesn't know how to create the database. I can write some commands that create the tables OK - but can I do the same for the database or does that have to be done through the UI...? Do you know phpMyAdmin? http://www.phpmyadmin.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Retrieve The Last Record in a Table
I would like to retrieve the last entry in a login table and present that to a user so they can verify the date we have when they last logged in. Is this possible...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: editor for remote files using ssh
I use HTML-Kit which highlights syntax for a number of languages, PHP included. I am unsure of its ability to connect using SSL but it's very customisable when creating a new remote folder and I use it to work on remote files all the time. It simply creates a connection if needed and saves the files when you hit save. Hope that was of use. -- - Michael Mason Arras People www.arraspeople.co.uk - Peter Risdon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have been using emacs/tramp for editing files on remote machines, but I find it can be flaky - no doubt I am doing something wrong. Can anyone suggest a good programmers' text editor that at least has syntax highlighting and can use ssh for accessing files directly on remote machines? I need a Unix program, preferably a FreeBSD port, but am happy to compile something myself if it will work consistently or at least give some kind of error message if it has difficulty, and not just hang. TIA. Peter. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unexpected T_ENCAPSED...
I've been working on a query to retrieve a user's data based on their UserID that is stored in a variable $_SESSION['logname'] which underneath I convert using: $UserID = $_SESSION['logname']; But when I execute a SELECT query: $CaptureDetails = SELECT * FROM RegisteredMembers WHERE UserID = $UserID; I get: Unknown column 'Admin' in 'where clause' I've tried everything I can think of. any suggestions...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Unable To Gain Access to phpMyAdmin Through Internet Browser
Thanks Torsten. I basically deleted the HTACCESS files and then put them back with an added entry but the host in question hasn't got a clue about technical support so I'm using another host. Their loss. -- - Michael Mason Arras People www.arraspeople.co.uk - Torsten Roehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi All. I'm hoping someone can help here because my Hosting provider's technical support haven't got a clue. I am unable to get into my phpMyAdmin area using Internet explorer. I'm challenged but cannot get in. I've tried: domain name FTP username and password the MySQL username and password I've even tried root This is dumb I know. But I need to get in. I have FTP access to the directory and can even open the htaccess files and have downloaded the config.inc.php3 file but am unsure what to change and where. Can anyone help please...? I'm usually protecting my phpMyAdmin dir with a .htaccess password protection. Then change the following lines in config.inc.php: $cfg['PmaAbsoluteUri'] = 'http://www.yourdomain.de/phpmyadmin/'; $cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address $cfg['Servers'][$i]['auth_type'] = 'config';// Authentication method (config, http or cookie based)? $cfg['Servers'][$i]['user'] = 'user'; // MySQL user $cfg['Servers'][$i]['password'] = 'password'; // MySQL password (only needed with 'config' auth_type) And this if you only have one database (otherwise leave blank): $cfg['Servers'][$i]['only_db'] = 'dbname';// If set to a db-name, only Of course you have got to change the values to your access values you got from your ISP. Hope it helps, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Unable To Gain Access to phpMyAdmin Through Internet Browser
Hi All. I'm hoping someone can help here because my Hosting provider's technical support haven't got a clue. I am unable to get into my phpMyAdmin area using Internet explorer. I'm challenged but cannot get in. I've tried: domain name FTP username and password the MySQL username and password I've even tried root This is dumb I know. But I need to get in. I have FTP access to the directory and can even open the htaccess files and have downloaded the config.inc.php3 file but am unsure what to change and where. Can anyone help please...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: change value of session variable?
My understanding of session variables Five is that you can write and re-write on the fly. I know from using VB that this is true and I am assuming that it is true of PHP. However, you may need to Empty the variable first Five. Hope that helped. -- - Michael Mason Arras People www.arraspeople.co.uk - Five [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is it possible to assign a value to a session variable on say, page1.php: $_SESSION['favcolor'] = 'blue'; and then on another page, say page2.php reassign the value: $_SESSION['favcolor'] = 'green'; ? So far experimentation says no. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Login Script
Brian I am developing a members area for our website and have chosen to use session cookies. Easy stuff really. No need for Pear, downloaded files to the client PC etc. -- - Michael Mason Arras People www.arraspeople.co.uk - Brian Krausz [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] While I know there are many scripts out there, and have spent many hours looking through them, I am having trouble finding a login script that fits my needs. I am looking for the following: A MySQL-based login system that doesn't use Pear :: DB. All I would like is for it to support cookies and all those things that would make it more secure. I have had trouble finding this...any suggestions? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Discussion Forum Online Chat
I've been looking around also and other than PHPbb didn't find anything I liked. There are developers out there that will do the work but that defeats the purpose of learning a language I think. Hope you have some look. -- - Michael Mason Arras People www.arraspeople.co.uk - Vinayakam Murugan [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi We are developing a PHP / MySql based website. The requirements include a discussion forum and online chat application with open chat rooms, invited chat one-to-one chat. There are many packages which are available on sourceforge and the like. I would like the list's opinion from a programmer's point of view. The packages would need to be customized according to the client's look feel. -- Warm Regards ~~~ Vinayakam Murugan Tel: 91-22 - 2288 2163 Ext 121 Help Desk: 91-22 - 2288 2774 Fax Number: 91-22 - 2288 2809 Mobile : 022-31018082 http://www.TheArgonCompany.com Viruses getting you down? Get your virus protected mailbox at http://www.tassm.com Linux. The Choice of the GNU generation -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Online Office Suite integrated w/ PHP
Daryl. What's the project goal...? -- - Michael Mason Arras People www.arraspeople.co.uk - Daryl Meese [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I'm looking for suggestions on what open-source office suites can be: 1. Offered over the Net as a service 2. Integrated with other apps (preferrably using PHP since the other apps are in PHP) 3. Possibly extended using PHP TIA, Daryl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parse Error, Unexpected $
I've checked my syntax but obviously missing something. Would anyone mind a quick scan: // Convert Values to Variables: $Title = $_POST[Title]; $ChristianName = $_POST[ChristianName]; $MiddleName = $_POST[MiddleName]; $Surname = $_POST[Surname]; $HomePhone = $_POST[HomePhone]; $Address01 = $_POST[Address01]; $Address02 = $_POST[Address02]; $Address03 = $_POST[Address03]; $City = $_POST[City]; $Postcode = $_POST[Postcode]; $Country = $_POST[Country]; $Nationality = $_POST[Nationality]; $Gender = $_POST[Gender]; $WorkPermitRequired = $_POST[WorkPermitRequired]; $MyStatus = $_POST[MyStatus]; // Dump Data Into MembersData: $UserDataDump = INSERT INTO MembersData (Title, ChristianName, MiddleName, Surname, DOB, TelephoneHome, Address01, Address02, Address03, AddressCity, AddressPostcode, AddressCountry, Nationality, Gender, WorkPermit, Status) VALUES('$Title','$ChristianName','$MiddleName','$Surname','$HomePhone','$Add ress01','$Address02','$Address03','$City','$Postcode','$Country','$Nationali ty','$Gender','$WorkPermitRequired','$MyStatus'); mysql_query($UserDataDump) or die(Couldn't Create User Data Entry. MySQL Error: . mysql_error()); -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error, Unexpected $
Jim I deleted a whole load of lines and still get the error. I've narrowed it down to this code: ?php // Verify User Input: echo brbrbr; $requiredFields = array('Title','ChristianName','Surname','HomePhone','Address01','City','Post code','Country','Gender','WorkPermitRequired','MyStatus'); $errors = array(); forEach($requiredFields as $fieldName) { // If using post, change $_GET to $_POST instead if (empty($_POST[$fieldName])) { // The field is empty $errors[] = 'Required field ' . $fieldName . ' empty!'; } } if (count($errors)) { // Empty fields detected! echo Sorry ; echo $_SESSION['UserCName']; echo brbr; echo The Following Fields Require Input ~ Please Go Back.; echo brbr; forEach($errors as $error) { echo $error . 'brbr'; } } else { echo Hi...!; ? But the error (line 40) is actually the last line...! :| -- - Michael Mason Arras People www.arraspeople.co.uk - Jim Root [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I see one problem, but not the one you are talking about. // Convert Values to Variables: $Title = $_POST[Title]; This (and the rest of the post fields) should have quotes: $Title = $_POST[Title]; (php looks for a constant named Title, instead of the string Title) What line gives you the parse error? On Mon, 19 Jul 2004 11:10:09 +0100, Harlequin [EMAIL PROTECTED] wrote: I've checked my syntax but obviously missing something. Would anyone mind a quick scan: // Convert Values to Variables: $Title = $_POST[Title]; $ChristianName = $_POST[ChristianName]; $MiddleName = $_POST[MiddleName]; $Surname = $_POST[Surname]; $HomePhone = $_POST[HomePhone]; $Address01 = $_POST[Address01]; $Address02 = $_POST[Address02]; $Address03 = $_POST[Address03]; $City = $_POST[City]; $Postcode = $_POST[Postcode]; $Country = $_POST[Country]; $Nationality = $_POST[Nationality]; $Gender = $_POST[Gender]; $WorkPermitRequired = $_POST[WorkPermitRequired]; $MyStatus = $_POST[MyStatus]; // Dump Data Into MembersData: $UserDataDump = INSERT INTO MembersData (Title, ChristianName, MiddleName, Surname, DOB, TelephoneHome, Address01, Address02, Address03, AddressCity, AddressPostcode, AddressCountry, Nationality, Gender, WorkPermit, Status) VALUES('$Title','$ChristianName','$MiddleName','$Surname','$HomePhone','$Add ress01','$Address02','$Address03','$City','$Postcode','$Country','$Nationali ty','$Gender','$WorkPermitRequired','$MyStatus'); mysql_query($UserDataDump) or die(Couldn't Create User Data Entry. MySQL Error: . mysql_error()); -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Jim Root [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse Error, Unexpected $
Thanks Jason. I've started doing that - damn well have to with nested IF statements. -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] But the error (line 40) is actually the last line...! :| You had a missing brace. When the error line is the last line (and especially if error is Undefined $end) then you likely have a missing ending brace or ending quote. Not trying to start a flame war here, but if you try a different coding style you might have an easier time keeping track of open braces. The working code (in my own style :)): ?php // Verify User Input: echo brbrbr; $requiredFields = array('Title', 'ChristianName', 'Surname', 'HomePhone', 'Address01', 'City', 'Post code', 'Country', 'Gender', 'WorkPermitRequired', 'MyStatus'); $errors = array(); foreach($requiredFields as $fieldName) { // If using post, change $_GET to $_POST instead // You can use $_REQUEST if you're unsure of GET/POST if (empty($_REQUEST[$fieldName])) { $errors[] = 'Required field ' . $fieldName . ' empty!'; } } if (count($errors)) { echo Sorry ; echo $_SESSION['UserCName']; echo brbr; echo The Following Fields Require Input ~ Please Go Back.; echo brbr; foreach($errors as $error) { echo $error . 'brbr'; } } else { echo Hi...!; } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stuffing those damn values into their fields...!
OK. So here we have on the submission form: input type=hidden value=$_SESSION['logname'] name=Hidden It echoes fine, so I know it's there. When I go to the target page it echoes fine there also and doesn't return an error. But more strangely, it doesn't perform the update I request: $UserDataDump = UPDATE MembersData SET Title='$Title'...) WHERE UserID='$_POST[Hidden]'; What's missing...? No error, no update...? No caffiene...! Help...! Oh - is OK, I have my Nicotine :) -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Parse Error, Unexpected $
Really sorry for taking up so many people's time on such a small issue. -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've checked my syntax but obviously missing something. Would anyone mind a quick scan: // Convert Values to Variables: $Title = $_POST[Title]; $ChristianName = $_POST[ChristianName]; $MiddleName = $_POST[MiddleName]; $Surname = $_POST[Surname]; $HomePhone = $_POST[HomePhone]; $Address01 = $_POST[Address01]; $Address02 = $_POST[Address02]; $Address03 = $_POST[Address03]; $City = $_POST[City]; $Postcode = $_POST[Postcode]; $Country = $_POST[Country]; $Nationality = $_POST[Nationality]; $Gender = $_POST[Gender]; $WorkPermitRequired = $_POST[WorkPermitRequired]; $MyStatus = $_POST[MyStatus]; // Dump Data Into MembersData: $UserDataDump = INSERT INTO MembersData (Title, ChristianName, MiddleName, Surname, DOB, TelephoneHome, Address01, Address02, Address03, AddressCity, AddressPostcode, AddressCountry, Nationality, Gender, WorkPermit, Status) VALUES('$Title','$ChristianName','$MiddleName','$Surname','$HomePhone','$Add ress01','$Address02','$Address03','$City','$Postcode','$Country','$Nationali ty','$Gender','$WorkPermitRequired','$MyStatus'); mysql_query($UserDataDump) or die(Couldn't Create User Data Entry. MySQL Error: . mysql_error()); -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Emtying Variables
Thanks for the tips guys. I'll be using session cookies on another site - need to bone up first though. I decided to post to a new page, that way the user has to click a link to back and in doing so the form reloads and refreshes the data without creating a submission. Cheap and cheerful...! -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What's the best way of emptying my variables once my form has done with them because although I disconnect from the database if the user refreshes the screen it sends another e-mail to me. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: old guy newbie needs some help
Bob. New myself but have started reading around sessions and found that you need two things enabled at the server end: track_vars trans-sid and bruce is right - you need to make sure the session_start command is immediately after the opening PHP tag. -- - Michael Mason Arras People www.arraspeople.co.uk - Bob Imperial [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] While I realize this is elementary to most of you, I am just getting started with php, moving from coldfusion :) I am currently reading through the chapter on sessions and running into a little issue that after making many changes to my php.ini file, I continue to get the following errors while running this: ?php session_start(); echo pYour session ID is .session_id()./p; ? Errors: Warning: session_start(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR) failed: No such file or directory (2) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\inetpub\wwwroot\phptest\listing10.1.php:13) in c:\inetpub\wwwroot\phptest\listing10.1.php on line 15 Your session ID is ff8651f382492ae56f436690d81ff124 Warning: Unknown(): open(/tmp\sess_ff8651f382492ae56f436690d81ff124, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 sorry this is so elementary but have to start somewhere, I am running php 4 on a win2k box w/IIS5. Though this does return a session id it's obviously not persistent on reload, an example of a session.save_path on a windows box would be great TIA just another old guy trying to learn new stuff. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using and Echoing Session Variables
Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
I've no problem declaring variables that way - used to it from VB anyway. Just wondered if there was a better way that's all. -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? Yep - any time you want sessions you need to start them (every page). This can be avoided with a php.ini setting, but that is just evil so we'll pretend I didn't suggest that :) ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? The way you're assigning session variables is fine. There are other ways you *could* do it; what are you aiming for? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
OK, so here's my conundrum... After verifying the user and pulling all fields from the record I declare two variables (just testing here): $_SESSION['UserID'] = UserID; $_SESSION['FurtherComments'] = FurtherComments; on the next page I start a session, everything OK. I echo the UserID variable - fine. But the FurtherComments variable simply echoes FurtherComments even though there's a database field called FurtherComments. Strange one... -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Thanks very much Tularis :) -- - Michael Mason Arras People www.arraspeople.co.uk - Tularis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] you need to call session_start() on every page, yes. Also, if you're bored with assigning values like that, and you're sure you're not overwriting anything, you could try: $_SESSION = array('UserId'='userid', 'Authorised'='yes','etc'='blah'); However, remember that you don't need to REassign values to $_SESSION to keep them stored over multiple visits! :) hope that helps, - Tul Harlequin wrote: Hi everyone. A few quick pointers if you have time... I've created a session, easy enough: ?php session_start(); ? I've created variables: $_SESSION['UserID'] = UserID; $_SESSION['Authorised']=yes; $_SESSION['logname'] = $logname; When a user clicks a link to a test page I created the following doesn't work though: echo $_SESSION[UserID]; Do I need to use the (again): ?php session_start(); ? ??? Confused...! Also - rather than list the session variables the way I am new line session, new line session etc. is there a better way...? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
So If I needed say 10 session variables all based on field values in the database I'd have to execute 10 separate queries and assign each variable separately...? If that's the case then fine - as I only need do it once I know, but it does seem a rather long winded way of doing things. -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: OK, so here's my conundrum... After verifying the user and pulling all fields from the record I declare two variables (just testing here): $_SESSION['UserID'] = UserID; now contains the string / constant UserID $_SESSION['FurtherComments'] = FurtherComments; now contains the string / constant FurtherComments on the next page I start a session, everything OK. I echo the UserID variable - fine. But the FurtherComments variable simply echoes FurtherComments even though there's a database field called FurtherComments. You'd need to do the actual call to your database and select the FurtherComments field, then assign the result of that query to $_SESSION['FurtherComments']. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
Jason Would there be anything wrong with using an include statement at the top of every page and the include page could then start a session, execute queries etc or would the session not start as it's not the first line in the page...? -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: So If I needed say 10 session variables all based on field values in the database I'd have to execute 10 separate queries and assign each variable separately...? If that's the case then fine - as I only need do it once I know, but it does seem a rather long winded way of doing things. Yes, this is pretty much the case. If you *really* wanted to you could avoid this by writing your own session handler - your custom session handler could then read/write each index into db columns if you want. The default handler acts the way it does because you might want to use non-db sources of information, or different databases, etc. http://www.php.net/session_set_save_handler -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using and Echoing Session Variables
My intention is: Include a file 1st line on file starts session Include another file, this will execute all the queries I need and set session variables. -- - Michael Mason Arras People www.arraspeople.co.uk - Jason Barnett [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Jason Would there be anything wrong with using an include statement at the top of every page and the include page could then start a session, execute queries etc or would the session not start as it's not the first line in the page...? That's completely fine. The main thing is, you just want to have session keys get written before you start sending output. Just to throw out another idea... Do you plan on having session keys used for *every* page? If so, then you could set your php.ini auto_prepend_file to automatically process your session script for every request. The main downside is if you have pages that don't really need the session vaiables then you'll be wasting resources when serving those pages. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Form Field Validation
Evening. Just wondering if there's a quick and easy way to validate form fields using PHP. Not really that concerned with actual content by using REGEX but want to ensure users have at-least bothered to put something in and if not display an error with the form field's name maybe. Any suggestions...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Error: unexpected T_ELSE on line 14...?
What the hell have I done this time...? Well, more to the point - what gave I missed...? if ($_SESSION[Authorised]=Yes); { // Body ~ Verified User: echo brbrbr; echo pThank you $UserCName, Now please just provide the following information and your aProfile will be loaded.; } else - The offending line...! { echo You need to go back and complete the fields correctly...!; } -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Error: unexpected T_ELSE on line 14...?
I figured it out. Got the semicolon at the end of that first line. Doh...! -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What the hell have I done this time...? Well, more to the point - what gave I missed...? if ($_SESSION[Authorised]=Yes); { // Body ~ Verified User: echo brbrbr; echo pThank you $UserCName, Now please just provide the following information and your aProfile will be loaded.; } else - The offending line...! { echo You need to go back and complete the fields correctly...!; } -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Form Field Validation
Simple as that eh...? If (formfieldname = empty()) { Do something { Else { do something else } ??? am I on the right tracks...? -- - Michael Mason Arras People www.arraspeople.co.uk - John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: Just wondering if there's a quick and easy way to validate form fields using PHP. Not really that concerned with actual content by using REGEX but want to ensure users have at-least bothered to put something in and if not display an error with the form field's name maybe. empty() -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Book Required
Morning There's loads and loads of books available on the subject of PHP MySQL. Does anyone have any recommendations...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem Stuffing Variable Value into an E-mail
I've generated a page where the user selects and completes a form. One of these is a free text area with the name TXT_Question. this is used later as $Question = $_Post['TXT_Question']; but for some reason when I send this in an e-mail like so: \nUser has selected eventID:\t$EventID \nAnd their question is:\t$Question Nothing gets posted. Any ideas...? The form is located at: http://www.arrasresources.co.uk/pmoclinic/ -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Emtying Variables
What's the best way of emptying my variables once my form has done with them because although I disconnect from the database if the user refreshes the screen it sends another e-mail to me. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Problem Stuffing Variable Value into an E-mail
yeah. I should have noticed that. Thanks again Torsten :) -- - Michael Mason Arras People www.arraspeople.co.uk - Torsten Roehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've generated a page where the user selects and completes a form. One of these is a free text area with the name TXT_Question. this is used later as $Question = $_Post['TXT_Question']; Shouldn't this be $_POST['TXT_Question'] (upper case)? but for some reason when I send this in an e-mail like so: \nUser has selected eventID:\t$EventID \nAnd their question is:\t$Question Nothing gets posted. Why should it be posted? You wrote that you wanted to send the data in an email. Any ideas...? The form is located at: http://www.arrasresources.co.uk/pmoclinic/ Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using SSL and PHP
Hi everyone. We've recently decided to move all our PHP pages to an SSL server. Can anyone give any advice on any caveats I should be aware of...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Echoing Results in a Table
I've managed to develop a query which pulls a finite number of records from a table based on a query. What commends do I now use to present these results in a table...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Echoing Results in a Table
Thanks John. I managed to get what I wanted. Now I have a very neat table showing my results. Nice. Next conundrum is stuffing a dropdown menu with results. I'll post a new thread but have a dig around the Internet, many thanks John. -- - Michael Mason Arras People www.arraspeople.co.uk - John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin wrote: I've managed to develop a query which pulls a finite number of records from a table based on a query. What commends do I now use to present these results in a table...? How would you show a table now with a single record? Start there. Now, what areas would need repeating with a finite number of records? Those elements should be in a loop, either FOR, FOREACH or WHILE, more than likely. If you don't know how to run your query and extract the results, then you've got some reading to do. Check the PHP manual; there are user comments that walk you through everything. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Populating a Dropdown Menu From a Query
Another day another conundrum. I have a form where one option is a dropdown menu. I'd like that menu to only have items in it that are actually available. Selecting the items with a query is easy enough but I wondered if anyone could tell me where to start wit the code. Am I using a for each again . . . ? Any help greatly appreciated. -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MCAL Function
It appears that PHP can create on-pine calendars...? I'm looking for tutorials but no joy. Can anyone point me in the right direction...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Opinion: PHP Sessions or Cookies
I am using PHP sessions for my site. Have done the numbers and have to agree that although cookies make life easier for the developer the whole reason for cookies is to make life easier for the browser. We have to accept that not all users can interrogate a cookie download and verify if the site is safe, so sessions it is :) -- - Michael Mason Arras People www.arraspeople.co.uk - Ed Lazor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm using PHP sessions for user tracking. My host provider's server is dropping session data. He swears it's my scripts and says I should be using cookies for better security. That goes completely opposite to my understanding, so I'd like to run it by you guys. Which is more secure: PHP sessions or cookies? In case you're curious, more details on the specifics of the problem I'm experiencing: I have a prepend file that executes start_session. The script assumes the user is a guest if $_SESSION[UserID] is not set. All guests route to the login screen. Successful authentication sets $_SESSION[UserID] and sends you to the original requested page. It seems fairly straight forward to me. People are able to login and start using the site, but the login screen displays randomly after they've already authenticated successfully. It sounds like PHP session data is being lost on the server. I've also seen error messages on web pages that report PHP / MySQL as having trouble reading from the temp directory. Here's the extact message: ERRORError writing file '/tmp/MYiYcf7q' (Errcode: 28). Anyway, those are the details. I look forward to hearing what you think. -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Session Variables ~ Best Practices
thanks Jay. -- - Michael Mason Arras People www.arraspeople.co.uk - Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I am also wondering if I need to declare all my variables one after the other or can I simply declare variables that I will be using immediately upon submission. [/snip] Since PHP is not strongly typed (like C or C++) you need not declare any variables. There are some caveats (see http://www.php.net/error_reporting ). Is it good practice? Not really, especially if you have a shop where more than one developer may be touching the code. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MCAL Function
OK, OK on-line...! -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It appears that PHP can create on-pine calendars...? I'm looking for tutorials but no joy. Can anyone point me in the right direction...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MCAL Function
I'll have a look at that Torsten, thanks. Can a user create their own entries then...? -- - Michael Mason Arras People www.arraspeople.co.uk - Torsten Roehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] OK, OK on-line...! -- - Michael Mason Arras People www.arraspeople.co.uk - Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] It appears that PHP can create on-pine calendars...? I'm looking for tutorials but no joy. Can anyone point me in the right direction...? PEAR has an excellent calendar package - if this is what you are looking for: http://pear.php.net/package/Calendar Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MCAL Function
I've been trying to do that all afternoon Torsten. Had the browser page sat there for a few hours now, only just got time to read it. -- - Michael Mason Arras People www.arraspeople.co.uk - Torsten Roehr [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'll have a look at that Torsten, thanks. Can a user create their own entries then...? I guess you'll have to create the admin frontend/backend yourself. The package is mostly for presenting/displaying calender data. Take a look at the package description for its intended use and features. Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php