Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,081 members, 7,821,715 topics. Date: Wednesday, 08 May 2024 at 05:09 PM

Post your PHP Problems Here - Webmasters (3) - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Post your PHP Problems Here (63382 Views)

Thread For All Your Blogging Related Problems Here / Get And Request For Your Php Problems Here / Connecting To Your Gmail Account From Your Php Application. (2) (3) (4)

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (20) (Reply) (Go Down)

Re: Post your PHP Problems Here by spikesC(m): 1:35am On Oct 10, 2013
cool_akins:
Thanks! I thought as much too. But my browser is not displaying my php files (its either blank or returning the source codes for all *.php)
Any tips?

I hope you're referencing the files via the url, "http://localhost/folder/filename.php"

And your php files includes the <?php tag.

From your attached screenshot, everything should be working fine cool
Re: Post your PHP Problems Here by teemy(m): 8:07am On Oct 10, 2013
and 'folder' should reside in your c:/wamp/www folder.
Re: Post your PHP Problems Here by Etecscompanies(m): 1:43pm On Oct 10, 2013
Design and host your own website without touching codes, here we have Joomlia website building videos(for starters to professionals) email us to get a free sample video (ziped in a folder)
Note you can also design the famous"Bulk sms website" with this knowledge (most Bulk sms website are build with Joomlia).
Total cost of video #4500 (you can order for a free video sample
Also available Java tutor videos, photoshop and cs3 graphic videos.

email us : emmanueltechnology15@gmail.com )
Powered by :Etecscompanies
Re: Post your PHP Problems Here by Elvisten10(m): 4:21pm On Oct 10, 2013
d citizen:
hw can i get a php codes to time an objective based question so dat once the time is exceeded, the question section is time out? I also need full explanation on hw to do quick exam marker for objective based question

1. What is the shape of the earth?
A. Spherical b. Elliptical c. Rectangular d. Square

Once the candidate click submit, result of the candidate is displayed. Also, i will be using radio for the option. I need a clue, fellow webmaster.
firstly, i will assume you know php. You store the time that you started the exam or questions in a session equating its value to time(). Then you echo the question and there corresponding options in HTML. When it is submitted you get the difference between the time it is submitted (by calling time() again) with the time you started stored in the session (the time it ended will be the minuend and the time it started will be the subtrahend) then compare the difference you got with the time you allocated for the question (difference > allocated time), after that check the answer submitted (using $_POST or $_GET) with the correct answer, if correct award score else fail. You can also add a percentage (number of correct answers divided by the number of questions multiplied by 100). I refused to say javascript because of some reasons.
Re: Post your PHP Problems Here by dheaven: 12:52am On Oct 11, 2013
You guys are trying.
Re: Post your PHP Problems Here by teemy(m): 7:20am On Oct 11, 2013
read up on the usleep() function and see how it applies in your case.
Re: Post your PHP Problems Here by dcitizen1: 9:04am On Oct 11, 2013
Elvisten10. do u reside in lagos ? If yes, i will like to have ur email to get intouch with you. Better still, u can send me email at francisakwari@hotmail.com. I look forward to ur response.
Re: Post your PHP Problems Here by dcitizen1: 9:05am On Oct 11, 2013
@Elvisten10. Thank you so much for ur insight and hint. do u reside in lagos ? If yes, i will like to have ur email to get intouch with you. Better still, u can send me email at francisakwari@hotmail.com. I look forward to ur response.
Re: Post your PHP Problems Here by CALEB65(m): 11:43am On Oct 11, 2013
pls guys. I've been having dis upload problem d error is ''mysql server has gone away'' error reading result sets header''. Pls help. Wat should I do??
Re: Post your PHP Problems Here by adewasco2k(m): 11:59am On Oct 11, 2013
CALEB65: pls guys. I've been having dis upload problem d error is ''mysql server has gone away'' error reading result sets header''. Pls help. Wat should I do??

That's one error message that always get me to lol..

Their are ways to increase the wait time of your server, but before I can address that, can you say what you were trying to upload and if possible give us your SQL statement.

If you are uploading a file you should upload to your host directory and store just the name in your database.
Re: Post your PHP Problems Here by adewasco2k(m): 1:05pm On Oct 11, 2013
This is no php problem but since there are few JS guys here which I happen not to be one for now.

I am working on a project, I have a data table, I am looking for a way to achieve this:

When you click on a data it should become editable!

So if there was 5 if I click I can now change it to 8 and. Also update the database.

Hmmmm, I know it is possible, I am trying Jquery but I want to know if there are any best way to such.
Re: Post your PHP Problems Here by InesQor(m): 7:37pm On Oct 11, 2013
adewasco2k: This is no php problem but since there are few JS guys here which I happen not to be one for now.

I am working on a project, I have a data table, I am looking for a way to achieve this:

When you click on a data it should become editable!

So if there was 5 if I click I can now change it to 8 and. Also update the database.

Hmmmm, I know it is possible, I am trying Jquery but I want to know if there are any best way to such.

Since you're using jquery, try these resources: (Jquery live edit)

http://www.jquery4u.com/plugins/10-jquery-live-page-edit-plugins/
Re: Post your PHP Problems Here by Elvisten10(m): 5:38am On Oct 12, 2013
d citizen:
@Elvisten10. Thank you so much for ur insight and hint. do u reside in lagos ? If yes, i will like to have ur email to get intouch with you. Better still, u can send me email at francisakwari@hotmail.com. I look forward to ur response.

i stay in port harcourt. My email is: elvis.chidera@gmail.com
Re: Post your PHP Problems Here by CALEB65(m): 7:58am On Oct 12, 2013
adewasco2k:

That's one error message that always get me to lol..

Their are ways to increase the wait time of your server, but before I can address that, can you say what you were trying to upload and if possible give us your SQL statement.

If you are uploading a file you should upload to your host directory and store just the name in your database.

I ws uploading a music file.
& d SQL statement is
If (isset($_post[''name''] && $_files['file']['size'] >0)
{$name =$_post['name'];
$fileSize = $_FILES['FILE']['SIZE'];
$fileType = $_FILES['FILE']['type'];
$tmpName = $_FILES['FILE']['tmp_name'];
$fileType = (get_magic_quotes_gpc() ==0 ? Mysql_real_escape_string($fileType
Re: Post your PHP Problems Here by CALEB65(m): 8:25am On Oct 12, 2013
$fileType =$_FILES ['file']['type'];
Mysql_real_escape_string(stripslashes($_FILES['File'])));
$fp =fopen($tmpName, 'r');
$content = fread ($fp, filesize($tmpName));
$content = addslashes($content);
Fclose($fp);
If(!get_magic_quotes_gpc()){
$name = addslashes($name);
} if ($db){
$SQL=mysql_query('' INSERT INTO upload (name, date, size, content, type)VALUES (SAME AS D OTHER 1 ))
move_uploaded_file($_FILES['File']['tmp_name'], ''destination folder'');

Echo '' File {$name} was uploaded'';
} else{ echo ''upload failed'';}

That the SQL statement.
Re: Post your PHP Problems Here by CALEB65(m): 8:54am On Oct 12, 2013
........ $fileType =$_FILES ['file']['type'];
Mysql_real_escape_string(stripslashes($_FILES['File'])));
$fp =fopen($tmpName, 'r');
$content = fread ($fp, filesize($tmpName));
$content = addslashes($content);
Fclose($fp);
If(!get_magic_quotes_gpc()){
$name = addslashes($name);
} if ($db){
$SQL=mysql_query('' INSERT INTO upload (name, date, size, content, type)VALUES (SAME AS D OTHER 1 ))
move_uploaded_file($_FILES['File']['tmp_name'], ''destination folder'');

Echo '' File {$name} was uploaded'';
} else{ echo ''upload failed'';}

That the SQL statement..
Re: Post your PHP Problems Here by Elvisten10(m): 9:31am On Oct 12, 2013
CALEB65: ........ $fileType =$_FILES ['file']['type'];
Mysql_real_escape_string(stripslashes($_FILES['File'])));
$fp =fopen($tmpName, 'r');
$content = fread ($fp, filesize($tmpName));
$content = addslashes($content);
Fclose($fp);
If(!get_magic_quotes_gpc()){
$name = addslashes($name);
} if ($db){
$SQL=mysql_query('' INSERT INTO upload (name, date, size, content, type)VALUES (SAME AS D OTHER 1 ))
move_uploaded_file($_FILES['File']['tmp_name'], ''destination folder'');

Echo '' File {$name} was uploaded'';
} else{ echo ''upload failed'';}

That the SQL statement..
www.stackoverflow.com/questions/15434377/cant-upload-a-pdf-file-larger-than-1-mb-errormysql-server-has-gone-away www.stackoverflow.com/questions/12425287/mysql-server-has-gone-away-when-importing-large-sql-file www.stackoverflow.com/questions/1316674/upload-size-problem-in-php-and-mysql
Re: Post your PHP Problems Here by Nobody: 12:32pm On Oct 12, 2013
My Question..

I added a search bar to a template I downloaded online after tweaking the HTML/CSS part of the template.. I now want the site to be dynamic in such a way that when one types a word in the search bar and clicks on search, Results will be shown to him where those words occured..

I wanna do this using PHP and am not yet advanced..

Any Ideas??
Re: Post your PHP Problems Here by Nobody: 1:24pm On Oct 12, 2013
With your level of PHP it is too hard to describe it to you, except you get someone to code it for you.
Re: Post your PHP Problems Here by dcitizen1: 6:08pm On Oct 12, 2013
Am planning to design a web application using php and mysql for checking result and i need a clue to accomplish this feat. We have three department, science, commercial and art and a common broadsheet for the three departments. However, i want the result of each of the student to display the subject results they offer jst like dat of waec. How will i go by this? I jst need ur guidance and i will do the rest
Re: Post your PHP Problems Here by adewasco2k(m): 7:09pm On Oct 12, 2013
d citizen:
Am planning to design a web application using php and mysql for checking result and i need a clue to accomplish this feat. We have three department, science, commercial and art and a common broadsheet for the three departments. However, i want the result of each of the student to display the subject results they offer jst like dat of waec. How will i go by this? I jst need ur guidance and i will do the rest

You still didn't give much details, I have done a school portal with php and mysql.

You need to have a well designed application.

Give a systematic detail.
Re: Post your PHP Problems Here by Elvisten10(m): 8:12pm On Oct 12, 2013
adewasco2k:

You still didn't give much details, I have done a school portal with php and mysql.

You need to have a well designed application.

Give a systematic detail.
Re: Post your PHP Problems Here by Nobody: 10:47pm On Oct 12, 2013
Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??
Djangocode: My Question..

I added a search bar to a template I downloaded online after tweaking the HTML/CSS part of the template.. I now want the site to be dynamic in such a way that when one types a word in the search bar and clicks on search, Results will be shown to him where those words occured..

I wanna do this using PHP and am not yet advanced..

Any Ideas??
Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??
Re: Post your PHP Problems Here by adewasco2k(m): 11:27pm On Oct 12, 2013
Djangocode: Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??

hmmm, was just trying to see how i will handle such a situation.

* presently the site is static and in html

That is a big problem, i dont know if there is a way around it but for this to work in php, you have to first make the site dynamic, even if the site contents are not coming from a database, they should be in php strings.

if you can achieve that then you can always use


strpos() or
preg_match()


I really am lost with such and hope to see others contribute as i will also like to know a smart way around such a problem
Re: Post your PHP Problems Here by Elvisten10(m): 7:00am On Oct 13, 2013
Djangocode: Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??
*dhtml:
With your level of PHP it is too hard to describe it to you, except you get someone to code it for you.
Re: Post your PHP Problems Here by Elvisten10(m): 10:24am On Oct 13, 2013
Djangocode: Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??
ok, i will help you out by coding it. Just give me some minutes.
Re: Post your PHP Problems Here by Elvisten10(m): 10:51am On Oct 13, 2013
Djangocode: Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??Seems no one can attend to ma question..

Or is it that hard??

I just need certain keywords I will need to be shown when the user searches for them..??
ok, just like i said earlier i will help you out with a simple code to achieve that. As usual i made it very simple and easy with no fancy features. All you have to do is add this code in the static html page:
<form method="GET" action="search.php"> <input type="text" name="string"> <br> <input type="submit" value="search"> </form> <br>
just copy it and paste in your index.html or any of the static pages, you can edit it to your taste if you know html and or css. I have attached the php files that will be used for the search. Download both of them. Edit the $url variable and $webPage variable to your site url and the static page you want to search respectively. After editing it, upload them to the same folder as the static pages. Thats all you need.

Re: Post your PHP Problems Here by Elvisten10(m): 10:59am On Oct 13, 2013
Elvisten10: ok, just like i said earlier i will help you out with a simple code to achieve that. As usual i made it very simple and easy with no fancy features. All you have to do is add this code in the static html page:
just copy it and paste in your index.html or any of the static pages, you can edit it to your taste if you know html and or css. I have attached the php files that will be used for the search. Download both of them. Edit the $url variable and $webPage variable to your site url and the static page you want to search respectively. After editing it, upload them to the same folder as the static pages. Thats all you need.
A demo of this can be found on www.xmx me.com/search.php?string=bank . Remember to change the $url in search.php from www.xmx me.com to www.yourwebsite.com and the $webPage in search.php also from payment.php to the static page you want to search for example index.html.
Re: Post your PHP Problems Here by dcitizen1: 12:01pm On Oct 13, 2013
What i need like the result of check of waec. i need a clue or guidiance on how to create php and mysql web application that will enable students to check their resul online t with common broad sheet but difference department especially science, commercial and art. the formart i need is like dat of waec. pls, i need ur assistance in this regards. Thanks
Re: Post your PHP Problems Here by Elvisten10(m): 12:34pm On Oct 13, 2013
d citizen:
What i need like the result of check of waec. i need a clue or guidiance on how to create php and mysql web application that will enable students to check their resul online t with common broad sheet but difference department especially science, commercial and art. the formart i need is like dat of waec. pls, i need ur assistance in this regards. Thanks
firstly, you have to assume we don't know what waec is and secondly, you need to give full details of how you want the site to be and also a visualization of how you want it to be. You haven't explain much and i haven't used the weac site before so i can't help much.
Re: Post your PHP Problems Here by dcitizen1: 2:29pm On Oct 13, 2013
Jst what the detailed page to display the result of each student in this format

Name: xyz

Year: 2009

class : ss

Result

Physics: A1

Chemistry : B2
mathematic:

English:

Biology:

After query is done tru filter search detail with name and year. I need hint , pls
Re: Post your PHP Problems Here by Elvisten10(m): 2:49pm On Oct 13, 2013
d citizen:
Jst what the detailed page to display the result of each student in this format

Name: xyz

Year: 2009

class : ss

Result

Physics: A1

Chemistry : B2
mathematic:

English:

Biology:

After query is done tru filter search detail with name and year. I need hint , pls
If i get you properly, when a user enters his name and year in a form and submit it, then a page like that will show up if his data is found ?. If thats what you are talking about, all you need to do is learn php and mysql and you can achieve that easily.

A SIMPLE APPROACH
You store all the results in your database. When a user submits his name and year, you search the column containing the names and years in your database. If found you then output the rows with their corresponding discription, if not found you output result not found.

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (20) (Reply)

Add More Than One Website Url To Your Twitter Account. / Top Google Searches By Nigerians 2015;Arsenal,Buhari,Diezani Arrest tops d list. / Mark Zuckerberg Eating Pounded Yam And Eforiro (Photo)

(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. 55
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.