Re: [PHP] href links not working in XP
Would it be possible to see your code for this? I have had similar problems within firefox but never within IE. Regards, David Marlin Unruh [EMAIL PROTECTED] wrote: I apologize because I posted this question earlier under Re: [PHP] href difference between OS's, and am still struggling with the problem. I think I have fished all the way around the lake, with no results. I cannot get href links to local files to work on an XP machine. The exact script that is creating the links works perfectly on two W2K machines. On the XP machine if I right click and select print, the given file will load in the application as desired, but a print dialog box is also opened. If I right click and select open nothing happens, same as if I just left click the link. I have added an AddType in the Apache conf file, but no change. I have looked at the IE security settings, nothing. The file mime type is set because I can use the file explorer and clicking on a desired file and the application will run and load the file for editing. -- Regards, Marlin Unruh Sunco Systems Inc. (308) 326-4400 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] pass variable from vbscript to php
Another way you can get around passing info to the server is to use hidden fields and make the entire page into a form with each link in turn submitting the form to the target script. You avoid putting sensitive info into the address bar and you can take advantage of header encryption if you need it. Regards, David --- Ashley [EMAIL PROTECTED] wrote: I have a unique problem that may be able to be solved another way, but I don't know how. What I need to do is pass a variable from a vbscript into php for use. I am using vbscript to access an activeX control on the computer that grabs the currently logged in user. This works fine, but I cannot determine how I can get that value into php so that I can use it. This is for an Intranet app. Basically I want to use the currently logged in user so that they don't have to log into the Intranet app. I am running this on a Netware 6.5 server running Apache 2.5. This may not be the best way to go about this, but it is the only thing that I have been able to find so I am open to suggestions. Thanks in advance, Ashley -- 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] What's the going rate for making websites ?
Hi Rene, I am becoming a little bit concerned about some of the advice you have been getting about setting a rate for your work. Don't get me wrong, there is nothing wrong with charging by the hour, but a lot of times one of two things happen, either you begin to resent your customer or they begin to resent you. I have another method for you to consider about pricing/costing your work. Try basing your fee on value. If someone wants a one page site then you look at how long it will take and ask them a few questions about what they want to get out the page. If the client believes that the single page would be the most inportant part of their interaction with their audience (I'm being intentionally extreme here) then would you feel right about only charging 50$ for it? Personally I would be looking at charging 500$ or even more. Another thing to think about where figuring out your rate is what your time is actually worth. A trimmined down version of how I have determined my rate in the past is as follows: My desired salary: 60,000$ Hours to work per year: 2000h Now start subtrating from hours to determine billable hours. Minus: Vacation time(3 weeks @ 40h/week): 120h Overhead time(accounting and such 4h/month): 48h Networking/Marketing time (figure about 1/3 of your time): 600h Sick Days(everyone gets sick eventually): 40h You also have expenses: Overhead (space to rent, cd or dvds, computers, hosting, etc): 20,000$ Advertising(brochures, cards, etc): 3000$ Determine sales needed for the year: Salary + expenses: 83,000$/year Determine billable hours (Total hours - Vac time, sick time, etc): 2000h - 120-48-600-40 = 1192h (actual time you can spend doing what you do) Rate to charge: Needed sales/billable hours 83,000$/1192h = 70$/h Use that number as a base, initially add 20% more time to your time estimates and find out what the client is willing to pay and charge them that or a little more, they will pay you more. HTH, David --- -{ Rene Brehmer }- [EMAIL PROTECTED] wrote: Hi gang Sorry for asking this question here, but I don't know where else to ask. And Goole'ing didn't help me much. My father-in-law has a friend in Alaska (and I'm in Canada) that needs a website done. Not sure what kinda site he wants done yet, or how much he needs me to do for him (like webspace, domain hosting, domain registration, and such) but for now I've been asked what it'd cost to get it done. I'm assuming it's something pretty simple, since it's just for a motorcycle club, but he wants a price first ... What do y'all charge when you do sites for people ??? ... In the past I've only done pro-bono work (because they usually don't require much work, so it's not a problem getting it done while working on other projects), but I've never actually done paid work before... It's more that I just recently moved to Canada (from Denmark) so I have no feeling with what the prices and rates are overhere ... TIA Rene -- 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] pass variable from vbscript to php
Please address replies to the list --- Rory Browne [EMAIL PROTECTED] wrote: I'm not sure how you'd go about this from a security point of view, but perhaps for an Intranet, you could, check their IP address from $_SERVER['REMOTE_ADDR'], and check your login server to see who is logged in from that IP. Perhaps considering that you seem to have a way of providing such information to the Browser, you could use cookies. For your clientside code you could do something like the following: Bare in mind that I don't really know vbs, and the usual disclaimers apply. script type=text/vbscript for each tree in NWSess1.ConnectedTrees anyTree=tree.FullName anyUser=NWSess1.LoginName(anyTree) document.cookie=userid= + anyUser + ; + document.cookie next /script You can then get the information then in PHP using $_COOKIE['userid']. I wouldn't normally advocate such a solution, you're relying on the user to tell you their name, and to tell you it accurately. You are assuming that they can't change document.cookie to userid=somebody_elses_name. That assumption only holds true if the person in question doesn't know how to use a browser. The situation you're describing suggests a strong lack of security. On Apr 5, 2005 1:28 PM, David Bevan [EMAIL PROTECTED] wrote: Another way you can get around passing info to the server is to use hidden fields and make the entire page into a form with each link in turn submitting the form to the target script. You avoid putting sensitive info into the address bar and you can take advantage of header encryption if you need it. Regards, David --- Ashley [EMAIL PROTECTED] wrote: I have a unique problem that may be able to be solved another way, but I don't know how. What I need to do is pass a variable from a vbscript into php for use. I am using vbscript to access an activeX control on the computer that grabs the currently logged in user. This works fine, but I cannot determine how I can get that value into php so that I can use it. This is for an Intranet app. Basically I want to use the currently logged in user so that they don't have to log into the Intranet app. I am running this on a Netware 6.5 server running Apache 2.5. This may not be the best way to go about this, but it is the only thing that I have been able to find so I am open to suggestions. Thanks in advance, Ashley -- 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] Best way to validate a date
Hi all, I'm looking to validate a date submitted through a form and I cannot decide which would be the best way to do it. The form of the date needs to be: -MM-DD. At the moment I'm torn between using a regex, something like: 20[\d][\d]-[0-1][\d]-[0-3][\d] or using the checkdate() function. Does anyone have any pros and/or cons to implement one method over the other or other methods you may have used? Thanks, David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] rounding down
On November 26, 2004 08:58, Brad Ciszewski wrote: hi everyone, i am looking for a snipplet to round down a number. i was wondering if you could put a negative number in the round() statement to do this, i want it to round down even if its at something.9, as long as its not a whole number, if needs to be rounded down. can anyone help me? Searching on the php.net site in the manual is/can be your friend. You want the floor() function. Take a look at: http://ca3.php.net/manual/en/function.floor.php -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. http://www.getanyideas.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to $_POST from a grid
On November 24, 2004 11:28, Stuart Felenstein wrote: I have set up a record grid, where the user may see a list of their records. Repeat region, etc. There is a button next to each record the user may click to allow them to update the particular record. snip / Since the grid only is echos of the recordset fields, how does it know the correct PrimaryID to send when I hit the submit button. I'm thinking this is perhaps my problem. Would it be possible to see the code that generates the grid? Both the php and HTML. -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. http://www.getanyideas.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to $_POST from a grid
On November 24, 2004 16:35, Stuart Felenstein wrote: To get to the grid I'm passing over the userID . Then basic a select statement in the results grid with a while loop the returns all the records related to the userID. It's just odd - because in Dreamweaver I build the grid with one table row, place my echo fieldx in each cell, then create a repeat region around the row. The repeat region is the while loop. The behaviour though is different for whatever reason. Using a link with GET (paramter in the URL) it distinguishes each primaryID correctly. Yet with POST no. As Jason just posted, yes it has individual submit buttons, yet they solely return the last record. Are you using one form for the entire page? If you make each row into a form and have the action set to go to the same page for each form then you would only need to add a hidden type input with the primaryID for which you want to search. Pull the value out of the _POST array on the action page and you can build your select with the appropriate where clause. If you are using one form for the entire grid, you will need to add a checkbox or radio button group in order to have the primaryID values sent to the action page. HTH -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. http://www.getanyideas.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [firebird-php] auto increment last insert
On November 24, 2004 17:47, Johan van Zyl wrote: It is not easy being a PHP newbie! If I am supposed to study ALL manuals in great detail before I am allowed to ask a question here.? Its not that you have to read all of the manuals and books. You just need to take some time to figure out what you really want to do with your code, then compare that with what php can actually do and adjust your 'to do' list accordingly. I myself and I am sure most of the others on this list visit the manual regularly just to make sure we have the args and returns of functions correct and various other things. We have just learned to look things up before asking for help. -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. http://www.getanyideas.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question on query string
On November 16, 2004 09:06, Stuart Felenstein wrote: Why is each value preceeded by the %5B%5D ? I think the % is for wildcards, but for the life of me can't figure out what 5B and 5D stand for. Ind%5B%5D=2Ind%5B%5D=3Ind%5B%5D=4Ind%5B%5D=5.. Stuart, The % is an escape character to let the browser know that the character isn't allowed in a URL. The browser then looks at the next 2 characters as a hex code for the ASCII character which should be there. So for %5B, it really is '[', and %5D really is ']'. You can see what all the ASCII codes are here: http://www.asciitable.com/ HTH -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. http://www.getanyideas.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database search logic question
On November 15, 2004 13:27, Stuart Felenstein wrote: See inline: --- Chris W. Parker [EMAIL PROTECTED] wrote: Stuart Felenstein mailto:[EMAIL PROTECTED] on Monday, November 15, 2004 1:10 AM said: The way I was approaching this was to grab the url, the part after the ? , so not the referer. This sounds like you're not familiar with the $_GET array. $_GET is everything after the ? in the url but as an array. It sounds like you answered before you either read or understood. I was talking about $_SERVER[QUERY_STRING]; This sounds like you're not familiar with the $_POST array. $_POST is everything that *would be* after the ? in the url but as an array. In $_POST there is nothing in the URL , there is no ?. I'm wondering at this point if I should create a way to let users save their search parameters, by grabbing the variables and storing them as an array in the database or go back to the URL method. I don't see how these two things are similar. shrugs They are not similar but will accomplish the same goal. If you want to store your array in a db use serialize() and unserialize(). In any case I would just store the search criteria in a cookie and leave the db out of it. A ccokie wouldn't help me one bit in this situation. Stuart Stuart, Did you take the time to think about what you were going to do before starting your application? You are asking more than one question within this newest version of your thread and are treating people's responses to each individual question as part of one all encompassing answer. If you are looking to have the SQL query string sent as POST vars but don't know how to get those out of the array, I would say you have some RTFMing to do, the same would go for sending the users to your results page AND ( you can do both POST and GET vars for a single page) adding a querystring to the url so that the user could bookmark the url and have a way to return to the same query they specified provided that the database query happens on/in the results page. If that answers any of your questions, great, if not, try planning ahead a little instead of asking the list to write the functionality code for you. -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. http://www.getanyideas.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] GUI editor for php?
On November 1, 2004 17:19, Andy B wrote: Hi. Is there any GUI editors out there for php? if so does anybody know of a good one that doesnt cost a ton of money?? Try taking a look at: http://www.thelinuxconsultancy.co.uk/phpeditors/ -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. http://www.getanyideas.com
[PHP] [Newbie Guide] For the benefit of new members
=== Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try http://www.php.net/manual/faq.php for answers to frequently answered questions about PHP (added by Christophe Chisogne). 2. Try http://www.google.com next. Searching for php YOUR QUERY may fetch you relevant information within the first 10 results. 3. There is a searchable archive of the mailing list discussion at http://phparch.com/mailinglists. Many of the common topics are discussed repeatedly, and you may get answer to your query from the earlier discussions. For example: One of the repeatedly discussed question in the list is Best PHP editor. Everyone has his/her favourite editor. You can get all the opinions by going through the list archives. If you want a chosen list try this link : http://www.thelinuxconsultancy.co.uk/phpeditors/ (contributed by Christophe Chisogne). 4. Not sure if PHP is working or you want find out what extensions are available to you? Just put the following code into a file with a .php extension and access it through your webserver: ?php phpinfo(); ? If PHP is installed you will see a page with a lot of information on it. If PHP is not installed (or not working correctly) your browser will try to download the file. (contributed by Teren and reworded by Chris W Parker) 5. If you are stuck with a script and do not understand what is wrong, instead of posting the whole script, try doing some research yourself. One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. After diagnosing the problem, send the details of your efforts (following steps 1, 2 3) and ask for help. 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side settings. You need to go for JavaScript and ask the question in a JavaScript list. On the other hand, you can access the information that is SENT by the user's browser when a client requests a page from your server. You can find details about browser, OS etc as reported by this request. - contributed by Wouter van Vliet and reworded by Chris W Parker. 7. Provide a clear descriptive subject line. Avoid general subjects like Help!!, A Question etc. Especially avoid blank subjects. 8. When you want to start a new topic, open a new mail composer and enter the mailing list address [EMAIL PROTECTED] instead of replying to an existing thread and replacing the subject and body with your message. 9. It's always a good idea to post back to the list once you've solved your problem. People usually add [SOLVED] to the subject line of their email when posting solutions. By posting your solution you're helping the next person with the same question. [contribued by Chris W Parker] 10. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html [contributed by Jay Blanchard) 11. Do not send your email to the list with attachments. If you don't have a place to upload your code, try the many pastebin websites (such as www.pastebin.com). [contributed by Burhan Khalid] Following these guidelines will ensure that you get effective responses from the list members. Otherwise, your questions might not be answered. Hope you have a good time programming with PHP. -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. http://www.getanyideas.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referencing a constant class variable
On October 6, 2004 15:34, Chris Boget wrote: Unfortunately, in PHP4.3.2 that doesn't seem to be working... :( Does anyone know how I can access a class' variable w/o having to instantiate an object of the class? This is more to the point of what I'm trying to do: Since PHP4 doesn't have enums, I'm doing this: class MyEnums { var $this = 'This'; var $that = 'That'; var $other = 'Other'; } Chris, A work around I've used in the past has been to use a keyed array such as: $MyEnums = array( is = This, at = That, er = Other ); Then you can refer to them like: echo($MyEnums[is]); // Prints This Just an idea. HTH -- Regards, David Bevan We could learn a lot from crayons: some are sharp, some are pretty, some are dull, some have weird names, and all are different colorsbut they all exist very nicely in the same box. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP (anti) crash policy?
On October 3, 2004 12:46, Olaf van der Spek wrote: Manuel Lemos wrote: Hello, On 10/03/2004 12:27 PM, Olaf Van Der Spek wrote: I think that making all failed memory allocations recoverable is not viable because more PHP C code that makes memory allocations assumes it only returns if it succeeds. Trying to change that everywhere memory is allocated is and monster job that I doubt that any PHP core developer will agree on doing. You could just create a new function for that: alloc_no_exception There's no need to change every call, you'd only need to change the calls that can take a NULL result. I find it hard to justify such function Why? I think a large number of data handling functions would benefit from such a function. And it'd make PHP more robust. Olaf, PHP is an open source language is it not? Since you're so smart why don't YOU write the code? -- Regards, David Bevan http://www.getanyideas.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nubie scripting question - Newbie Guide for the benefit of new members
On Sun, 2004-09-19 at 11:36, revDAVE wrote: Q: here is what I am unclear of: since I do not know PhP - how do I get the main display page to read this part of the URL? img src=??? Url.pic ??? alt=deals - how do I write this? thanks in advance for your help Since you do not know PhP, how about picking up a book or try a google search? You might even find the code you need in a tutorial about forms and posting to $_SELF. But to ask a mailing list how to write a snip of code which is covered in just about every beginning PHP book, you may want to think about learning some basic PHP. You may also want to review the Guide for new list members which follows: === Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try http://www.php.net/manual/faq.php for answers to frequently answered questions about PHP (added by Christophe Chisogne). 2. Try http://www.google.com next. Searching for php YOUR QUERY may fetch you relevant information within the first 10 results. 3. There is a searchable archive of the mailing list discussion at http://phparch.com/mailinglists. Many of the common topics are discussed repeatedly, and you may get answer to your query from the earlier discussions. For example: One of the repeatedly discussed question in the list is Best PHP editor. Everyone has his/her favourite editor. You can get all the opinions by going through the list archives. If you want a chosen list try this link : http://www.thelinuxconsultancy.co.uk/phpeditors/ (contributed by Christophe Chisogne). 4. Not sure if PHP is working or you want find out what extensions are available to you? Just put the following code into a file with a .php extension and access it through your webserver: ?php phpinfo(); ? If PHP is installed you will see a page with a lot of information on it. If PHP is not installed (or not working correctly) your browser will try to download the file. (contributed by Teren and reworded by Chris W Parker) 5. If you are stuck with a script and do not understand what is wrong, instead of posting the whole script, try doing some research yourself. One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. After diagnosing the problem, send the details of your efforts (following steps 1, 2 3) and ask for help. 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side settings. You need to go for JavaScript and ask the question in a JavaScript list. On the other hand, you can access the information that is SENT by the user's browser when a client requests a page from your server. You can find details about browser, OS etc as reported by this request. - contributed by Wouter van Vliet and reworded by Chris W Parker. 7. Provide a clear descriptive subject line. Avoid general subjects like Help!!, A Question etc. Especially avoid blank subjects. 8. When you want to start a new topic, open a new mail composer and enter the mailing list address [EMAIL PROTECTED] instead of replying to an existing thread and replacing the subject and body with your message. 9. Only quote the relevant parts of an email when replying. Do not Quote everything (including huge code snippets) only to say I agree, for instance. [contribued by Paul Waring] 10. It's always a good idea to post back to the list once you've solved your problem. People usually add [SOLVED] to the subject line of their email when posting solutions. By posting your solution you're helping the next person with the same question. [contribued by Chris W Parker] 11. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html [contributed by Jay Blanchard) 12. Do not send your email to the list with attachments. If you don't have a place to upload your code, try the many pastebin websites (such as www.pastebin.com). [contributed by Burhan Khalid] Following these guidelines will ensure that you get effective responses from the list members. Otherwise, your questions might not be answered. Hope you have a good time programming with PHP. -David
Re: [PHP] sharing records with assigned users
On Thu, 2004-08-26 at 13:49, PHP Junkie wrote: Ave, Jay.. Firstly thanks a lot for the tips. I appreciate that and in fact I do try to go methodically in most cases, even using the pen paper to create my flow charts and diagrams of what I'm about to program. I actually love that method of designing an application. In fact, for this Phonebook application as well, right here in front of me is the piece of paper in which I've tried to draw the different modules, their behaviors and the functions which I will need to create in order to make this application work intelligibly. Coming back again to my problem.. If, in the table I'm storing my records, I create a field which stores the Users allowed access to that particular record, then in case of multiple users, that single field will hold multiple user names... Which is a problem for me. And I might be applying a very wrong approach, logically, which is why I came forward for some assistance. Thanks again. On 8/26/04 1:37 PM, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] There is one feature that Admin gets which I'm trying to figure out. When the Admin is adding a record, he gets to decide which users he wants to share the record with. He can choose particular Users by clicking on their name to share that record with. How do I make that happen? Any suggestions? [/snip] I am going to go a little sideways in response to your question because I believe that we should help people to learn and improve. Many people enter the PHP arena and become exposed to the shear power available to them, so they want to accomplish more and more complex apps than they would in the course of normal web site interaction. I believe at this point one makes the leap from web developer to applications developer. One of the first things an applications developer should learn is how to design an application before they write the first line of code. This requires things like flowcharting and UML. Every programming language book has several words on this. So, Junkie, what you should do is break down the the componenets into statements. The statements can then be broken down some more...into processes, decisions, etc. Once done you will know what the code is. It's very zen. 1. Admin adds record. 2. Admin chooses user type(s) that will be allowed access to record. 3. Admin saves information so that application knows. NAME ACCESS_LEVEL bhoover admin pnosehair user etc. [/off soapbox] Very much to what Jay mentioned above, you have to take the time to design, although you may have the logic thought out, you need to look at the way you want to interact with the data and the problems it seems to be presenting to you. An app like you are writing is very straight forward IF you have the data structured properly. aside I used to give a project very similar to this to my students when I used to teach programming and logic and all of my students had the same problem/aside I would advise you to read up on normalization particularly second and third normal forms and that should clear up your difficulties. Have a quick read of: http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html to start. HTH -- Regards, David GetAnyIdeas Web Design [EMAIL PROTECTED] P. 416.452.9410 F. 416.570.4529 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another Help
On Thu, 2004-08-26 at 01:27, Syed Ghouse wrote: Hi Also pls tell me how to extract the href value of the code below a href=http://www.google.com;/a a href='http://www.google.com'/a a href=www.google.com/a i m weak in regular expression in php and tell me how to learn easily. Regards Syed Is it just that you're lazy and don't want to search the archives for something which is asked all the time, or just naive enough to think that the people on this list will do your work for you? Try one of the following: 1. Search google: http://groups.google.ca/groups?q=href+group:php.generalstart=50hl=enlr=ie=UTF-8group=php.generalselm=01c1ba53%24dd9c6270%24e2563944%40cc1966780arnum=57 2. Search the archives of this mailing list 3. Buy a book 4. If all of the above fail, turn off your confuser/computer and walk away -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OO Question for PHP4
On Wed, 2004-08-11 at 11:14, Jed R. Brubaker wrote: Hi all. As the subject suggests, I am using PHP4 and am having something going on that I don't think should be. Presume the following code class Foo { function Foo () { return Bar; } } $foo = new Foo; echo $foo; $foo comes out as an object. Does this have to be done in two line like this?: class Foo { function bar () { return Bar; } } $foo = new Foo; $bar = $foo-bar; Or is there a better design approach I should be reminded of or learn? Thanks in advance! Constructors always return a reference to the object. A return statement is disregarded. Have a look at http://www.php.net/language.oop.constructor in particular a post in the comments by steffen staehle. HTH -- Regards, David GetAnyIdeas Web Design [EMAIL PROTECTED] P. 416.452.9410 F. 416.570.4529 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Q] How to setup Dreamweaver so that PHP scripts are executed?
On Fri, 2004-08-06 at 17:17, Michael T. Peterson wrote: Hi, I know this must be really obvious to many of you, but I have been unable to configure DW (using [preferences] or [site-edit]) so that it will execute a php script from a form action=foo.php... tag. When the submit button is clicked the php file is displayed, rather than executed. Here's the HTML code of the submit button form: form action=update_river_measurements.php method=post name=form1 target=mainFrame select name=interval_period optionSelect interval/option option value=22 days/option option value=44 days/option option value=88 days/option option value=3131 days/option /select input type=submit value=Update Database /form When the [Update Database] button is clicked, the file specified by the action parameter is displayed, rather than executed. My dev machine is a Windows XP system with Apache, PHP, and MySQL installed. I have confirmed that my Apache-PHP configuration is correctly configured. For example, PHP correctly executes the script when I pass update_river_measurements.php to IExplore.exe from the command line. Also, when I upload these local files to my ISP, the PHP also executes correctly. Any suggestions as to how to get DW to execute these files would be appreciated. Cheers, Michael P.S. Cross-posted to the DreamWeaver news group When you set up or edit your site, click on the advanced tab and set up the testing server. All you need is the server model (PHP MySQL), access (Local/Network), testing server folder (C:\path\to\your\apache\htdocs_folder), and finally the URL prefix (http://localhost/path_to/folder_with_scripts). Then when you preview your pages in a browser, it will run through apache and not as a local/unserved file. Hope this helps, -- Regards, David GetAnyIdeas Web Design www.getanyideas.com [EMAIL PROTECTED] P. 416.452.9410 F. 416.570.4529 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [Q] How to setup Dreamweaver so that PHP scripts are executed?
On Fri, 2004-08-06 at 22:07, Michael T. Peterson wrote: Thanks to both of you, but it is still not working. I've configured the site (both local and testing) correctly, but what gets passed to IExplore is the URL below: C:\Program Files\Apache Group\Apache\htdocs\northwest_steelheader\rivers\northwest_rivers.htm http://localhost/northwest_steelheader/ does not get passed. I can't help but think that I'm not configuring the form action= correctly. Cheers, Michael Michael T. Peterson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I know this must be really obvious to many of you, but I have been unable to configure DW (using [preferences] or [site-edit]) so that it will execute a php script from a form action=foo.php... tag. When the submit button is clicked the php file is displayed, rather than executed. Here's the HTML code of the submit button form: form action=update_river_measurements.php method=post name=form1 target=mainFrame select name=interval_period optionSelect interval/option option value=22 days/option option value=44 days/option option value=88 days/option option value=3131 days/option /select input type=submit value=Update Database /form When the [Update Database] button is clicked, the file specified by the action parameter is displayed, rather than executed. My dev machine is a Windows XP system with Apache, PHP, and MySQL installed. I have confirmed that my Apache-PHP configuration is correctly configured. For example, PHP correctly executes the script when I pass update_river_measurements.php to IExplore.exe from the command line. Also, when I upload these local files to my ISP, the PHP also executes correctly. Any suggestions as to how to get DW to execute these files would be appreciated. Cheers, Michael P.S. Cross-posted to the DreamWeaver news group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Your action attribute looks okay but the url which the browser is getting isn't the url in the action for the form (C:\Program Files\Apache Group\Apache\htdocs\northwest_steelheader\rivers\northwest_rivers.htm) your browser should be getting update_river_measurements.php. Make sure all of the files are in the same directory/folder or at least make sure the appropriate navigation is added to the url (e.g. ../update_river_measurements.php). Or maybe, put everything in the same directory and try it that way as a means of narrowing down where the problem is. -- Regards, David GetAnyIdeas Web Design [EMAIL PROTECTED] P. 416.452.9410 F. 416.570.4529 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Slideshow using PHP
The only way I can think of to create a slide show with PHP, not that you would need to use the PHP engine at all would be to use a meta refresh in/on each page to move to the next slide and possibly provide the user with a button/link they could click on to advance the slides. Your other idea about using Flash might be the way to go as there is already a template if you choose FileNew From Template within Flash, but I'm not sure why you would want to weigh an app like that down with constant communication to the server. My 2c at least. Regards, David Bevan GetAnyIdeas Web Design P. 416.452.9410 F. 416.570.4529 E. [EMAIL PROTECTED] W. http://www.getanyideas.com -Original Message- From: Todd Cary [mailto:[EMAIL PROTECTED] Sent: July 7, 2004 6:19 PM To: [EMAIL PROTECTED] Subject: [PHP] Slideshow using PHP I would like to have images displayed automatically using PHP with a Database and/or an array of images. Is there any sample code available for doing that? Can that be done with Flash and PHP? Todd -- 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] Help installing on Fedora 2
Hi Everyone, I'm finally making the switch from Windows to Linux for development and I've run into a problem. I've got Apache, MySql, and PHP (I think, all the files look like there in the right places) installed. However I can only get Apache and MySql up and running, I can't seem to figure out what went wrong with PHP. Has anyone had similar problems or know where I can look for documentation specific to the Fedora flavor of Linux? I've looked/gone through the docs on the PHP and Redhat sites but I must be missing something. Any help would be greatly appreciated. Regards, David Bevan GetAnyIdeas Web Design P. 416.452.9410 F. 416.570.4529 E. [EMAIL PROTECTED] W. http://www.getanyideas.com/ http://www.getanyideas.com
RE: [PHP] mod_rewrite
Hi Pete, Check out the documentation on the Apache site: http://httpd.apache.org/docs-2.1/mod/mod_rewrite.html They also have a URL Rewriting Guide: http://httpd.apache.org/docs-2.1/misc/rewriteguide.html Hope this helps. Regards, David -Original Message- From: pete M [mailto:[EMAIL PROTECTED] Sent: July 1, 2004 9:14 AM To: [EMAIL PROTECTED] Subject: [PHP] mod_rewrite Know this is off topic bu can anyone help with a tuotial of something - been looking everywhere All I want is a rule to rewrite www.example.com?page=mypageid=20this=that to www.example.com/mypage/20/this tia Pete -- 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] disguise as static content
Hi Florin, Another trick if you will, to fool search engines would be to use mod_rewrite, provided you are using apache. Check out the documentation on the apache site: http://httpd.apache.org/docs-2.1/mod/mod_rewrite.html Hope this helps. Regards, David -Original Message- From: Florin Andrei [mailto:[EMAIL PROTECTED] Sent: June 28, 2004 9:24 PM To: [EMAIL PROTECTED] Subject: [PHP] disguise as static content My personal website (see signature below) is almost entirely built with PHP, based on a rudimentary templating engine that i wrote. With the exception of a few well-defined sections (pictures gallery, blog, etc.) the most of it is static, i.e. it changes very rarely. Some Web applications (including but not limited to search engines) seem to treat differently the static content proper (true HTML pages) and pseudo-static content generated by dynamic pages (such as PHP pages that change rarely). I would like to continue to use PHP for my website, but somehow fool the Web clients into believing they're seeing true static content. Since the content changes rarely (like once every other month), there is no harm in pretending it's true static content. I suspect there are quite a few things that can be done to achieve that goal: 1. change extensions to .html even though they're PHP files (i know how to trick Apache into doing that) 2. don't send HTTP headers that indicate dynamic content I don't know how to achieve #2. I also don't know if there are other things to care about in order to totally disguise the dynamic nature of the pages. I'm open to suggestions. Thank you in advance. -- Florin Andrei http://florin.myip.org/ -- 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] is there any application , by using i can produce php exe files in windows ?
Hi Ravi, Not that I'm that far through the book yet, but Professional PHP4 by Apress (ISBN: 1590592484) has a chapter about Non-Web PHP Programming that you may want to check out. Regards, David Bevan GetAnyIdeas Web Design P. 416.452.9410 F. 416.570.4529 E. [EMAIL PROTECTED] W. http://www.getanyideas.com -Original Message- From: Ravi [mailto:[EMAIL PROTECTED] Sent: Monday, June 21, 2004 4:20 AM To: [EMAIL PROTECTED] Subject: [PHP] is there any application , by using i can produce php exe files in windows ? HI, is there any windows application , by using we can produce standalone php .exe files ? --- knowledge is power share it --- -- 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] Free news feeds
Hi Tim, Have you tried a google search? Try: http://www.google.com/search?num=100hl=enlr=ie=UTF-8q=free+news+feed s+pharmaceutical+medicalbtnG=Search There might be something useful to you. Regards, David Bevan GetAnyIdeas Web Design P. 416.452.9410 F. 416.570.4529 E. [EMAIL PROTECTED] W. getanyideas.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 10, 2004 12:33 AM To: [EMAIL PROTECTED] Subject: [PHP] Free news feeds Hi I'm looking for recommendations for places I might look for free news feeds to incorporate into our companies website. Specifically I'm looking for feeds related to the pharmaceutical and medical industries. Thanks, Tim -- 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