Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,200,552 members, 7,975,170 topics. Date: Monday, 14 October 2024 at 06:25 PM |
Nairaland Forum / Science/Technology / Programming / Hello, Pls I Need Your Help On This PHP Problem (773 Views)
Pls Help Me With This Php Code / Help With This Php Code. / I Need Help With This Php Code For Email And Sms Autoresponse (2) (3) (4)
Hello, Pls I Need Your Help On This PHP Problem by OCTAVO: 11:18pm On Aug 01, 2013 |
I'm trying to output data from my data base but all to no avail. I have checked my codes over and over again. Pls is there anything I'm doing wrong? My coding goes thus: <?php mysql_connect("localhost", "root", "" ) or die("We couldn't connect!" ); mysql_select_db("testsite" ); $result = mysql_query("INSERT * FROM users" ); while($row = mysql_fetch_array($result)) { echo $row['name']." ".$row['email']." ".$row['password']; echo "<br />"; } mysql_close(); ?> Here is the error message I'm getting on my browser: Parse error: syntax error, unexpected '[' in C:\xampp\htdocs\testsite\output.php on line 10 Line 10 is where I have my while loop accoding to the error message above. Thanks |
Re: Hello, Pls I Need Your Help On This PHP Problem by CODEEATER(m): 11:30pm On Aug 01, 2013 |
OCTAVO: I'm trying to output data from my data base but all to no avail. I have checked my codes over and over again. Pls is there anything I'm doing wrong? My coding goes thus: Personaly I hate concatenation In echo statmnts, so frst of all,I sujest u chng d code to sumtin lyk while($row = mysql_fetch_array($result)) { try dis frst,let's c |
Re: Hello, Pls I Need Your Help On This PHP Problem by OCTAVO: 11:34pm On Aug 01, 2013 |
CODE-EATER:Ok, thanks my Oga. Lemme try. |
Re: Hello, Pls I Need Your Help On This PHP Problem by CODEEATER(m): 11:40pm On Aug 01, 2013 |
OCTAVO:DNT 4get to close d while statement oo |
Re: Hello, Pls I Need Your Help On This PHP Problem by OCTAVO: 11:42pm On Aug 01, 2013 |
It didn't work. Got this error message: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\testsite\output.php on line 10 |
Re: Hello, Pls I Need Your Help On This PHP Problem by spikesC(m): 11:45pm On Aug 01, 2013 |
Abeg, is it INSERT * OR SELECT * |
Re: Hello, Pls I Need Your Help On This PHP Problem by CODEEATER(m): 11:48pm On Aug 01, 2013 |
spikes C: Abeg, is it INSERT * OR SELECT *Mtcheww, I no even c dat 1....select jor |
Re: Hello, Pls I Need Your Help On This PHP Problem by OCTAVO: 11:52pm On Aug 01, 2013 |
Thank you guys I don see my mistake. It is supposed to be SELECT. Thank you once again. |
(1) (Reply)
How To Build A Virtual Reality System – In Your Living Room / Top 4 Ways Google App For Education Can Save Your School 1 Million Naira. / Internet Tools
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14 |