Web Design Forum: How to creat a new tab after... - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How to creat a new tab after... Rate Topic: -----

#1 User is offline   kensha 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 870
  • Joined: 12-August 10
  • Reputation: 17
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 26 January 2012 - 01:08 PM

How do I let PHP or Javascript create a new page tab after 5 $_POST[""];
has been placed?

So that when the 6the post has been placed, the 1ste post will be dropped in a new tab.

So how do I do this?
I can't really find the answer over the internet, even around xml.
I have treid with all of those different kinds of loops but nothing that I can get to work yet.

Maby some'one has a good tutorial or know how to create it?

This post has been edited by kensha: 26 January 2012 - 01:09 PM

0

#2 User is offline   FizixRichard 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 325
  • Joined: 05-October 07
  • Reputation: 47
  • Gender:Male
  • Location:Market Deeping, England
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 26 January 2012 - 04:12 PM

I guess you mean 5 submissions of a particular form or forms will lead to a link appearing in a menu or some other navigation that will allow them to do something?


If so, probably the best way is to create a session or cookie, on the submit of the form, check for the cookie (or session, or both) and if there isn't one set one and set its value to 1.

So they have a session var or cookie (or both) with the value 1.

If the session var exists or the cookie exists, you increment the value stored and save.

Using a cookie as an example.


1. User submits form
2. Site checks for cookie called "formcount"
2.1. If formcount does not exist, set cookie formcount with a value of 1
2.2. If formcount exists, read the value, increment by 1 and re set the cookie
3. if formcount = 5, allow the link to appear.

That kind of thing.

Thats actually a cruddy example, you'd want to elaborate on it and probably use sessions over cookies (unless you want the count to persist past the current session), but thats the type of process you'd want to take. If you have a membership system you'd probably tie it into that, with some kind of indicator.

This post has been edited by FizixRichard: 26 January 2012 - 04:13 PM

0

#3 User is offline   kensha 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 870
  • Joined: 12-August 10
  • Reputation: 17
  • Gender:Male
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 26 January 2012 - 08:34 PM

Thanks it gave me a nice cleared mind about it.

I will try to fix something of it this Saturday:)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users