Advice Needed On Auto-redirect
I'm not quite sure how to accomplish the following:
1.) There is a webservice with a login form (let's call it login.php)
2.) Once you enter username / pwd you will be forwarded to another page. You cannot add variables in a query there directly (let's call it main.php)
3.) That new site uses a session management
4.) I want to read out the provided text on that new page
5.) After logging in I can't call that new site (main.php) without adding the correct session parameters:
This will not work: http:/www.domain.com/main.php (giving out DB error)
This will work: http://www.domain.com/main.php?session=31ae0ef85c3c
I have found a browser emulator script that does the automatic login:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Cross Platform Problem - Advice Needed
I would appreciate some help from someone who has knowledge of working with css, php javascript and how they interact. Ive been working on a task for the last few days and have started to hit a brick wall. I need general advice on whether I m tackling the problem the correct way and some solutions for my current problems...
How To Auto Redirect To The Desired Page
i have a page(call page2) that adds user information to the database but i want this page(page2) to redirect to the calling page(previous page i mean-> page1)with the added user info being displayed...how can i enable the page to auto redirect back to the page1 after it has finished inserting into the database in page2.??
CMS Advice
Apologies for x-posting but seemed no obvious single forum for my query. I am new to content management systems and am considering using a cms to implement a content-based web site with a view to applying a unified appearance across content, and to be able to easily add & organize new content. My ISP offers joomla, mambo, postnuke & xoops so no worries about installation. My main criteria (in rough priority order) are: Ease of use Flexibility & ability to customize Range of features Size of userbase
Maths Advice
I am learning PHP. I see in my training that "a good threshold for comparison of currency amounts is ".00001" (due to the way computers store numbers internally). I know of internal storage forms even from the old days when I programmed assembler on IBM 360/370. But I've also seen this threshold given for javascript etc. I have yet to understand why 5 digits are compared for eventual 2-digit rounding... Anyone with easily understood advice? (I don't need code, just reason)
Advice On Running PHP As A DSO, CGI, Or Both...
I am currently running Apache 1.3.27 under darwin (Mac OSX 10.2.6 BSD kernal), with PHP 4.30 as a DSO module. I recently discovered I need to run some PHP scripts outside of the Web server as batch jobs by utilizing CRON since their execution time would typically time-out a Web session. My question is three part: 1) Is there any difference in PHP running as a DSO vs. a CGI under Apache? Meaning, is there any difference in performance, features, access to databases, etc. 2) Should I run PHP as a CGI instead of DSO? Would this allow me to run my scripts under Apache without modification AND allow me to run PHP as a stand-alone language for command-line and CRON scheduled execution, etc. 3) If there is a performance difference with PHP as a DSO versus CGI can both be run on the same machine without conflict?
Security Advice On My Cms
I am using the following code to make module system cms. Code: //index.php require_once("mainfile.php"); global $site_path; if (!isset($_GET["file"])) { $file="index"; } else { $file=$_GET["file"];} if (!isset($_GET["mod"])) { $mod="home"; } else { $mod=$_GET["mod"]; } if(ereg("..",$mod) || ereg("..",$file)) { echo "Bad boy"; exit(); } $file ="$site_path/modules/$mod/$file.php"; if (file_exists("$file")) { include($file); } else { die("sorry, File does not exist");} You can see that I am using this concept http://www.mysite.com/ index.php?mod=$modulename&file=$modulefilename I just want to know is there any security hole in the code.How to stop direct access to a file withouth my main index.php file ?let say i have module call"member" and inside i have index.php,myprofile.php etc... and I want to stop direct access to these file(ie.http://www.mysite.com/member/index.php) onlyway, http://www.mysite.com/index.php?mod=member&file=index is allowed in this case.
Forum Advice
i'm writing a forum in php and i have a few logical questions which i would value your advice on. when you delete a post that has more than one child what is normally done with the orphaned posts?
Artist Needs Advice.
I am an artist working out of Los Angeles, and I have a project I've been working on which may need MySQL and or PHP. I put an advert in the local paper asking readers to leave a message on a vonage voicemail number. I've received about 60 messages so far. People have left some pretty interesting stuff without knowing what the purpose was. What I want to do now is create a web site so that I can make the original messages plus new messages available to people as well. I would need some kind of program which polls a POP3 email account for new messages, and then parses the WAV audio files out of the email and places them on the web site. I have a good friend who is a web designer, who can handle the front end, but he doesn't know anything about database programming - he told me to check in with you guys. My current web host uses Apache Web Server, Apache SSL Server, MySQL, qMail POP Server, qMail SMTP server. Does anyone have any suggestions as to what I might need to do/ use to get this idea off the ground?
Advice For A Re-tread
I have been writing Cold Fusion code for a number of years using both SQL Server and Access. Cold Fusion used to be pretty good when it was owned by Allaire. In my opinion, a downhill slide started when MacroMedia took it over. Now that Adobe has it, I have visions of my web pages taking as long to load as Adobe and with just as much overhead. Therefore I have a sense that I should seriously look at PHP. Can anyone advise a good source (web site or book) that would help me make the transition.
PHP Recruitment Advice
First of all apologies if this is off topic - it's less PHP language than administration.... I'm trying to recruit a PHP/MySQL programmer for our UK (London) based financial training company. The job involves working on a large database application that comprises and spans multiple functions, including content management, report generation, accounting functions, CRM systems as well as a host of much smaller functions. My questions are two fold. 1. Does anyone know of a good recruitment agency or method for obtaining decent candidates. So far most of the applicants I've seen have rather poor PHP skills, or (more commonly) MySQL abilities that are really not up to scratch. So, any advice from anyone who has tried to recruit for such a position would be well received! 2. With some trepedation, any interest here in such a job? Salary is circa. £23,000. We have very high standards and please only apply if you would describe yourself as particularly competent. A typical interview question I've been asking (and most people failing) is to describe what the 'explain' mysql keyword does and how it's used. I'm less interested in commercial experience than I am a solid knowledge of PHP/MySQL and the ability to hit the ground running with technical problems. On the plus side, this is a great company to work for, with a very fast paced style - guarantee you'll never be bored!
CMS/Portal API Advice
I need advance considering CMS/Portal. Features welcomed: - not a final product, in the first place, but API - ability to shape it into different CMS solutions - ability to work with PHP/Postgres/MySQL hosting server - API for simple content editing, template editing, for user management, user authorization - BSD-like or GPL-like license, I am redy to contribute back Is there anything out there that comes close to this ?
Looking For Advice: Checkboxes And Mysql
I am currently working on a project, and I need some advice on a couple of things. I am working on a system that displays records from a database. I have included a checkbox beside each record that is displayed, and the idea is that when the user selects the check box and hits submit, the record will disappear from the list of records, but must not be deleted from the database. So my main question is what kind of field will I need to add to my database? Some sort of field that has true/false setting? And from this I take it I must perform a check to see if the record is true or false in order to determine whether or not to display it? Code:
LF: Advice On Server Scripting
I am a web admin for a HP UNIX/Infommix DB system. I have 2 nodes. Node A: OS (HP10.20)Web server (httpd). Infomration DB and PERL/CGI & HTML are running to provide information(retrieved from Informix DB). 95% of perl/CGI scripts are running on this node Node B: OS (HP11.20) Load build and some CGI scripts running. The old web interface was HTML embeded with PERL/CGI. It can provide simple and plain display. I have a request to refresh the overlooking of web page. I am doing some research to see if there is any scripting language or tool I can use which can 1) Provide good looking web interface 2) Call all my old perl/.cgi scripts, so that I don't need to re-write PERL/INFOMRIX DB API LIB 3) Don't need to re-write DB API/LIB to retrieve infomrix databas infomix I have 2 server script candidate here "PHP" and "Java Script".I don't have any hand-on experience with these 2 server script. Can anyone provide advice on whether "PHP" or "Java Scripts" can seemlessly take use or call PERL5/CGI scripts? Or is there any better choice if NEW one can take use/ca;; my old PERL5/CGI scripts? I hate rewriting DB API/LIB.
Advice On Forum To Built
I'm going to build a simple forum in mySQL. I've thought about it for a while now, but still can't figure it out completely: If i have say 5 main categories, One has 5 sub-categories. Each sub category consists of individual threads. Wich each has the possibility to be commented. The question concerns the thread & comments part. My first idea was to create one table Threads, and one Comments. The Threads-table would have the original post, starting a thread, and the Comments table would have the comment, and the id of the thread it belongs to. (so all comments there are in the whole forum) Now i thought of the following: I could create a new table for each thread to save it's comments in. And call it e.g. 'Comments_4576', (belonging to thread 4576) Pro is a lot faster to load, delete etc. but contra is more difficult to count cross-tables and everything.
I Need Some Cleanings Tips And Advice.
its basically a free forum and free blog driven web site dedicated as a source people can goto to find out how to clean and remove stains from pretty much anything. Problem is, as of yet, you couldn't find out how to clean anything right now cause the site is new and no one has found it yet. We don't know enough about cleaning and tips and tricks to really fill the site. Were looking to get more useful content so that the website eventually shows up in search results. If anyone here is interested, visit www.CleaningTips.com/forum.html, and if there is anything you could add to the site please feel free to do so. Email me at CleaningTips@gmail.com if you find anything that could improve the site or if something doesn't seem to be working properly.
Need Advice On Where To Host Large Php App
I have a large PHP/MySQL application that I am running. I am looking to switch to a new host as my current provider seems to go down a lot. I would much prefer to get a dedicated server so that I can have more control over everything. My problem is this... I have been all over the internet reading reviews for the past 2 hours, and I can't believe how disappointed I am... most of the "most popular" companies as ranked by CNET and others receive 1/10 or 2/10 ratings by real customers... I've read countless horror stories of companies overcharging, lying, and not delivering on promises.
E-commerce Site - Need Advice
I'm thinking of building an e-commerce site in php. Anyone got any advice in building one? What is the best way to implement a payment system? Are any legal issues involved?
Advice On Selling An Ebook?
I have an ebook that I want to sell that is too big to email to customers. What is the best framework in which to sell it? Using PHP 4.4.4, btw.
Date Calculations Advice
I am getting the date like this $date = strtotime(date()); ok, there you have it, a Unix time stamp of the time, date, and everything else. From here, is this the best way to do calculations. Like if I wanted to tell when 48 hours had passed from this date, how do I go about doing that. I know for example if you wanted to add a day, you check on how many "number's" here are in a day and put + that number onto the strength. Can someone tell me some stuff about this, so I am more familiar with dates, before I start all of these calculations.
Advice On Image Handeling?
I am currently developing a site that involves user's being able to upload images as part of an ad. (Items there selling) I want to allow each user to upload up to 5 images. I understand storing the path for one image but how is this achieved for multiple images. Also, whats the best way to approach the layout for the form that will allow the user to upload images. Is something like the way gmail does it where you click browse and a new file field appears. Or is there even someting than I can integrate with my own site?
Need Advice On Making An Array From Mysql_fetch_array.
First I do understand that mysql_fetch_array is an array by its self, but my problem is, that this array will be padded with alot of items that I really don't want, such as nulls, id field and list name. You see my idea is to have a table that stores select list items. This can be used to allow users/admins to modify my scripts to add in what data they need to suite their needs... This would replace my static arrays that I have created for various things. Now I had two arrays, one for a long name and one for a short name. Their keys matched up. Now when trying to move these items into a database, I have two rows, again one for long and one for short. For space reasons, when I create items in my database I create a simple string from the keys, then I explode this and pull the various information out.
Need Advice On Multithreaded Socket Server
I want to prepare some training for some new employees regarding the topic of multithreaded socket services implemented in PHP. I've been able to implement this with my own design, but I'd like to hear your thoughts on what you think are some good design goals, such as answering a question like, "Would you open a pack of 5 socket listeners each time you go over a socket threshhold, just to make the server that much more available?" Or perhaps a question like, "Would you create a 'knock-knock' port for all initial connections and then ask the client apps to come in on another dynamic port?" Or perhaps, "Would you prefer to mix UDP and TCP for fault tolerance?" Specifically, I was hoping to demonstrate a fake SMTP server that would drop the "emails" as text files on the hard drive, or perhaps a simplistic Telnet server that allows one to at least do 'cd' and 'ls'.
Magic Quotes Advice Required
I'm doing some scripts for a co-located server. I notice that magic_quotes_gpc is set to off on this installation. Now, as a minimum, I run all user supplied data through mysql_real_escape_string and check for newlines in header form fields for mail scripts. What other steps should I take?
Advice About Fetching User Information
I have this content management system I've developed myself. The system has a solid community part where members can register and then participate in forums, write weblogs and a ton of other things. So, in instances where I list, for example, the latest weblogs. I list the headline of the weblog, the date and the name of the member who wrote it. Now, the name isn't just "Smith", but rather Smith's online status, his nick and his "label", and can look like this: <imageSmith M:34 The image is either a green or red dot depicting his online status. When I want to display this, I use this function: print member_name(12); With 12 being the id number of Smith, and the only information about the writer of the weblog (i.e. I don't save his nick or label in the weblog post, and certainly not his online status). So, when using member_name() I look up the id 12 in a prefetched array of members, displaying the correct information. In a compact format: ## index.php require_once("member.php"); print member_name(12); ## member.php $q=mysql_query("select id, name, label from members"); while ($r=mysql_fetch_assoc($q)){ $GLOBALS["members"][$r["id"]] = $r; } function member_name($id){ $m = $GLOBALS["members"][$id]; $online = in_array($id, $GLOBALS["surfers"]) ? "on" : "off"; return icon("online/$online") . " $m[name] $m[label]"; } ## So, whenever requiring member.php, all members are prefetched and put into $GLOBALS["members"], which has worked just fine. Then I have infromation about any given member at my fingertips. But now I have some sites which are beginning to get a pretty large number of members, so prefetching them all becomes timeconsuming (sometimes up to one second, which is unacceptably slow). I can't fetch information about each single individual at the point of showin his or hers information since there can be long lists of for example weblogs and there might be 40-50 member names to be shown, which would result in 40-50 seperate mysql requests, which would flood the MySSQL server, I'm afraid. So, my question is this; what other way can I do this in? Is there a faster way to read thousands or even tens of thousands of information points and put them in an array quickly? Or is there a better way to read information about single members at runtime? Aggregation is most certainly an option. Can I write a tab separated text file and read that one in member.txt - would it be faster? Should I write one text file per user and read that file when needed? Anyone got any experience in doing this? How did you solve it?
Order By, Any Advice On A Multiple Sort?
i'm trying to work out how to use a multiple order by statement. May just be having a bad day, but i'm drawing a blank on where it is on the mysql manual so i'm asking here, i basically need to sort by 2 options, the first one works fine, but the second one doesn't, heres an example of how i thought it could work: $query.=" order by url desc, company_name"; but that appears not to be the case
Wiki Software Selection Advice ?
We have a short list of wiki software listed below that we are evaluating. The project will also be using wordpress and there will need to be some integration between the wiki and wordpress. It seems a wiki that can use mysql and is also PHP based would be favorable. I had also considered DBM/DBA which are object persistent databases, but our team does not seem to favor that solution, though I have not really analyzed that approach or have enough experience to feel I understand all possible advantages or disadvantages that it might have. I have not been able to find a DBM that works with PHP on windows which some development will be on. It has been mentioned that DBA is not going to cache the way a database does, although I also heard somewhere else it would be faster and I suspect using memcache with DBA would work, but I am not sure if there would be references inside the objects that would cause a problem with that ? I had looked into phpwiki, but had many problems with the install on windows and I didn't see that it have very good wysiwyg editing. Anyway, the short list: mediawiki bitweaver jspwiki snipsnap pmwiki is set up to use flatfiles, so we may be dropping that, although possibly it could be modified to work with mysql.
Retrieving Multiple Rows Advice
let's say I've an array of articles's id $arr_art_id=(1, 551, 2015, 6 .......n ) what option is better (1 or 2), in order to achieve better performance? (pseudo code) 1) for i=0 to array count{ select * from articles where articles.id=$arr_art_id[i] mysqlquery($sql) //do whatever i have to do } 2) $or ='' for i=0 to array count{ $sql.= $or . 'articles.id='. $arr_art_id[i]; $or ='or' } $sql = 'select * from articles where' .$sql mysqlquery($sql) //do whatever i have to do
SOAP Library Advice Request
I use PHP 4.3.0 and I have found this SOAP libraries: NuSOAP 0.7.1 (SOAP 1.1, WSDL 1.1 and HTTP 1.0/1.1) PEAR::SOAP 0.9.4 beta PHP-SOAP 0.1.1 alpha <-- discarded I think NuSOAP is the more mature library, but it is older than the other ones. The last stable NuSOAP library versión was released on 2005-07-27.
Advice On Php/Mysql Application - User Validation
Im rather new to developing mysql/php applications and am after some advice on handling user validation for a web based system, ive implimented a number of ways and would like to know which way is better in regards to security etc, here are the following ways i have implimented this in the past: a) user submits via form login/pass, mssql db is accessed via a no login no pass account, and a basic "select from subscribers where user=$blah and pass=$boo" is implimented, if theirs a result match the user can proceed, if not they are booted back to the login with an error message. b) each user of the system has an account in the mysql/user table, set up via grant statements via a system admin, so then you can do a direct login to the database with the users submitted info, if the connection is granted then the rest of the subscriber info is pulled out of a second table in the applications own database, linking the two tables on unique login names. if allowed to make a database connection, the user can access the rest of the site, if access is denied, they are booted back to the login screen. for both of these methods i store the submitted user/pass info in session variables, and this info is verified on every page by an include file, is this a good idea? or would it be wiser to use a variable that can only be set when a successful login in is made, then to check if that variable exists instead? (doing this so that no one can simply go http://www.etc -etc/mypage.php) My questions on these methods are: a) is it a good idea to set up a database that doesnt require a user to actually log into it, ie to check to make sure the users info is correct, an account must be setup for anyone to access to check if the login info is correct, because if they cant access the database how can they have their login/pass validated? I have a feeling that employing that method simply isnt very secure. b) is having a large number of accounts in the user table of the mysql db a safe way to go? this way i can enforce security through mysql itself ... if the user doesnt have 'granted' access to the database, they get no access, mysql is performing this validation for itself.
Advice For Setting Up Local Hosting/mysql/php ?
this is going to sound dumb to most but here goes. Please keep in mind, I am coming from a windows background. I want to do some development using PhP and animated gifs. I see that the patch can be applied to PhP 4.3.2 and 4.3.3 to enable imagegif and animate functions. I have come to the realization that I am going to have to run my own local linux server. My question then is what do I need to install a local server to host web pages from, I will also need a database. I want to run a typical hosted site except I want to be able to easily create gif animations and I also want access to ImageMagick. My current host has access to neither. The installation of the MySql I think I can handle. It's the apache and other web stuff part I think I am going to have trouble with. So what do I need to run a typical host site then? PhP, Perl, cgi-bin, MySql, Apache, umm?? Any good books or sites for setting up a server step-by-step?
Advice On Sorting Results (in A Table): Session Variables?
I have a table of query results (from PostgreSQL) that I am displaying using PHP. I would like to give the user the option to sort the results by clicking on one of the various table headings. I know that I can sort them at the time that I query them, but this would require a new database query each time. I am thinking of making the heading a hyperlink similar to the following: <a href=myresultspage.php?sort=price> //this would be the link to sort by the price collumn. I have managed to make a simple sorting function, by putting the results into an array then sorting the array by the appropriate dimension of the array as indicated by the value of $sort. My question is this: If I keep the results in an array, how can I pass the array when the user clicks on the hyperlink that tells which collumn to sort by? Do I need to use session variables? It doesn't seem like I can pass an array as a GET variable.
Help Needed..
I am Ronny from Germany, so please excuse my English. Since early 2002 I am trying to solve th following problem: I am trying to programm a meta search engine - which fetches the results of about 10 search engines. Now I solved the problem with fopen(), fread() etc. But it is to slow - and so my question is : Is it possible to make several http requests at the same time in PHP or do you know a Perl Program where I can put in maybe 10 URL´s and the results where saved in an array which I can use in PHP???
NOW() Help Needed
I am putting data into a mysql database, the database tells me the time a user signed up, this is placed in the table using the now function but the date always shows as 2002/11/06 not how i would like it, i want it to view as 06/11/2002, i think it can be manipulated in many ways. Also on manually updating a further table i have to place in a date manually, when i put the date in the fiels using phpmyadmin the date still looks like 2002/11/06, i try change the value but with no joy.
Help With Regexp Needed
Hello, I'm coding a simple templating system to fit in to my simple CMS system. The way this will work is that the administrator of the CMS can edit the template (stored in a db), and insert 'snippets' into the template. A snippet is a piece of code (also stored in the db) which may have PHP code in it, which will then be eval()'d. A simple example would be: <html> <head> <title>[[title]]</title> </head> <body> [[menu]] [[content]] </body> </html> The snippets here are [[title]], [[menu]] and [[content]]. This is fine as long as I know exactly which snippets will be in the template, but that's not always the case. So what I want to do, is search through the string containing the template, find all the snippets and save these in an array. My guess is that this'd be done with regular expressions, but I'm still very new at those, and have no idea how to do what I want. Does anyone have an idea about how to do this? Thanks! Alex
PHP Developers Needed
hello, My name is Joshua Abbott and I am project administrator of the AWHCP project on sourceforge.net. Our project is aiming to create an advanced web hosting control panel of 350 end user features (once final release) and a lot of security features in a packaged OS called extremeserv-linux @ extremeserv-linux.com . We desperately need PHP Developers to help in this endevour. So, if you are interested or want more information please email URL
Help Needed In Sending SMS With PHP
I want to know the process and the Implementation of sending text SMS to mobile phones with PHP. Is there any article regarding this? or any code example?
Nusoap & XML Help Needed
I am getting below result when accessing a web service. Now how can I separate the values and assign them in variables for further use?
Help Needed With DB_DataObject
I have just adopted a PHP project and need some help understanding DB_DataObject. I've looked around on the web and can't find a simple explanation. Basically, my MySQL database has no tables. I have a createTable.php script which I believe is a standard script, it runs but tell me "NO TABLES". There is a function in the script called _createTableList() which is looking for tables not finding any (I don't really understand why there should be pre-existing tables when the script is supposed to be creating them...) I have .ini files which seem to describe the schema, and classes which correspond to the entries in the .ini file - but no SQL, and I do not understand how to get the schema into the database. I believe the environment is set up correctly for the script to find the .ini files. I hope that was clear, and I hope somebody here can advise me - I'm sure it's simple enough for somebody who knows what they're doing with DB_DataObject! Using PHP5 btw, if that matters.
Help Needed With Nntp
Im having trouble with a script trying to display newsgroups. The script just hangs when trying to select a newsgroup (fget command)....
New Line Help Needed
I'm trying to insert a newline character into the string below for an <INPUT TYPE="image" ALT= tag but when I hold the mouse over the image I see the string but without a newline break in the string - how do I get the line to break?
Sql Optimize Help Needed
SELECT * FROM post WHERE forumid=1 ORDER BY ctime LIMIT x,10 ctime=creation time both forumid and ctime is index separately it take too much time when x is so large. how can i optimize this query?
Help Needed In IMAP+PHP
I am having a mail client script, which will read and send mail to mail server, using IMAP. When i am sending mail with attachment through forwarding, the attachment is not getting attached correctly, Plz any one can help me to come out of the problem. Note : I am using PHP 4.3.10 + IMAP + Apache +Zend Engine v1.3.0
URL Variable Needed
For a specific purpose I need the complete url displaying in the Url bar in the browser. Is there any function which provides that?
Advise Needed
I've no access to mysql NG, so I ask here. We are looking for a system where user pay for having their article on homepage. Only 5 articles are shown every time. The length of the service is 2 weeks. The articles should be shown equally between clients. If a user select a particular object in search engine, then coming back on the homepage the shown article should reflect their need. How to create a mysql query to get equally chances between articles ? If only 2 announces of 5 are bought, I then want to fill the free places with professionals articles. I'd like to get random article from professionals, but not 2 articles from the same pro. How to do so ? also with query (not with PHP) If isn't possible, on PHP should I get all announces then try to find randomly between results ?
Reg Expression Needed?
I'm retrieving some content from a DB but I would like to get first couple sentenances from the content and display this, I don't for sure if I have to use a regular expression to do this, but any assistance would be much appreciated.
PHP Script Needed
Question: Where can I get a script(s) that do this: http://network-tools.com/analyze To be more precise, I would like the script that: prints visitor's IP, monitor resolution, referral link, colors depth, scans ports etc... etc... I have been searching hotscripts.com for few days, came out empty handed...
Is_uploaded_file() Help Needed
I'm using the is_uploaded_file() function to check if I'm uploading via Http - I am using copy() and when I use the is_uploaded_file() function it returns false - am I using the wrong upload method?
Help Needed With Script
I am quite new to all this and have stumbled at the first gate. Can anyone tell me what is wrong with this? <?php $connection = mysql_connect("domain","databaseusername","databasepassword"); $sql = 'SELECT * ' $sql .= 'FROM `PageElements` ' $sql .= 'WHERE pageid = 1 LIMIT 0, 30' $result=mysql_query($sql,$connection); while ($row = mysql_fetch_row($result)) * error message refers to this line { for ($i=0; $i<mysql_num_fields($result); $i++) echo $row[$i] . " "; echo " "; } mysql_close($connection); ?> I am getting the following error message: Warning: Supplied argument is not a valid MySQL result resource in /home/nprie/public_html/index2.php on line 26 (i have put an asterisk next to line 26 above) as above script is a fragment of a php file.
Pattern Syntax Help Needed
I am trying to insert an astrisk (*) in front of a particular Selection field in an HTML file. The purpose of this would be to mark fields that have missing or incorrect data from a form post. But alas, I am having trouble getting the pattern syntax right. This is what I have so far:
|