/    Sign up×
Community /Pin to ProfileBookmark

Development of Dynamic Page

I am analyzing my project, which is created encoding:

[QUOTE]

<? php

$ File = ‘page’ , / / stores the filename
/ / Create the file
$ newFile = fopen ( $ file . ‘php.’ , ‘w +’ );

if ( $ newFile ):
/ / open the file by placing the pointer in writing

moves the pointer to the beginning of the file
rewind ( $ file );
if ( fwrite ( $ file , $ file_insert )): / / Inserts the content on the page created
echo ‘File updated successfully’ ;
endif ;
fclose ( $ file );
else :
die ( ‘Could not open file’ . $ file . . ‘php’ );
endif ;
else :
die ( ‘Could not create file.’ );
endif ;

[/QUOTE]

And also in a way with less code like this:

[QUOTE]

<? php

$ File = ‘beta’ ,
$ fn = “/ template.txt.” ,
if ( copy ( $ fn , $ file . ‘txt.’ )) {
die ( “Success!” );
} else {
die ( ” Error copying file ” );
}

>[/QUOTE]

Now I want to create this:

-> I will have a form on a page in the administration with name_of_a_page, title_of_a_page, meta_description, meta_tags and content.
Explanation: (name_of_a_page (name_of_a_page.php remain in the url), title_of_a_page (will be the title of the page), and other key targets (robotic search search engines), content (we have created content for the new page) words).

It will open a file called template.php (as in the code above) and take the data from $ _POST [] forms write to a page $ temp and after saved on the bench with an insert (page.php)

Example: this is the page with client side :: functions to display content off the bench. + Would be – so I need to create.

[QUOTE]

? < php
static $ table = ‘page’ ,
$ page = $ _GET [ ‘name_of_a_page’ ];

switch ( $ screen ):
case $ page , / / parameter passed through the menu click
sql_seach $ = $ pdo -> prepare ( ‘SELECT *‘ . self :: table . ‘name_of_a_page WHERE =’ . $ page );
$ pdo -> execute ( $ sql_seach ),
if ( $ exists_as_tab_menu AND $ tab_page_data ):
if ( $ sql_seach ):
/ *
Make the display of content: as if by parameter
* In this case it would open a file with all formatting eg template.php
*
Took the files that came from the database and displays in <div id=”content”> The content that was taken
* Cattle bank would be in here </ div>
*
/
else :
/ * loads an error page the same way but where would
<div Id=”content”> *
Displays a frame like a 404 error page </ div>
* /
endif ;
else :
/ / Did nothing since there is new content in the database.
endif ;
break ;
endswitch ;

[/QUOTE]

For client (browser client _ ie the action of the client side) based on a menu (have a loop checking each new content that will have on the table menu in the data base, whenever there is a new menu registered on the bench it checks:

Have a menu, if yes check for content to be displayed on a new page, if both is yes
makes the display of the menu and when you click the menu, it passes the parameter to url and displays the page.

Not sure on where I am going wrong.

Can someone help me in this creation?

Thanks

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@ginerjmMay 13.2014 — Sorry - I have no clue of what you said in your English because I was so mesmerized by the absolutely off-the-wall example of your PHP code. Where did you learn to code? Did you actually find this example somewhere on google and copy/paste it for your use? Or did you find this in an article about 'how to write broken PHP'?

You have so many problems with the code above that you should be worrying about the language before you spend anymore time on your problem.

Clue: You can't have spaces in the variable names.

And there are many other problems.
Copy linkTweet thisAlerts:
@sonaliavermaauthorMay 14.2014 — Basically I want to make a caching system which does not fetch data from the DBMS every time.

I am working on coding again. Hope that works for me.
Copy linkTweet thisAlerts:
@ginerjmMay 14.2014 — Clean up the code you do have and re-submit it. Have to know you CAN code before spending any time on helping you. What you have presented is just IMPOSSIBLE code.
×

Success!

Help @sonaliaverma spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...