What you're trying to do can't be done by inlining the included content with include() or require().
The content that you wish to include will require an additional request to the server for the new content and this will need to be rendered to be browser either using AJAX or an iframe. AJAX would be generally accepted to be the best practice in this case.
This is somewhat advanced stuff, but the jQuery library would make this relatively easy. You would assign a function to the onclick event of the link that would "get" the content from the content URL.
I want to make a binary tree structure for my multi level marketing website but not able to get it.
It could be great if someone could link me to a good tutorial or if someone can help me through this.
<b>Getting Started with InstallShield Automation and Perl</b>
It's true, even Windows users succumb to the allure of extensibility and readability of Perl. Some even opt to use it to automate the build processes of their products and associated installers.
But, there's a problem. The InstallShield Help Library generally provides examples in the most ubiquitous Windows scripting language -- VBScript. The idea behind this is that working with COM Objects and Collections will be specific to the language in question, and that the core ideas behind the VBScript samples will apply to each in a very similar fashion.
While this indeed does hold to be true, it can be daunting if you are suddenly tasked with writing a script from scratch. Below are some of the VBScript examples from the InstallShield Help, translated to Perl.
read the blog at <a href="http://blogs.flexerasoftware.com/installtalk/2010/12/getting-started-with-installshield-automation-and-perl.html">http://blogs.flexerasoftware.com/installtalk/2010/12/getting-started-with-installshield-automation-and-perl.html</a>[<a href="http://blogs.flexerasoftware.com/installtalk/2010/12/getting-started-with-installshield-automation-and-perl.html" target="_blank" title="New Window">^</a>]
thanks for your input but what to do about the links? I mean there will be 100s of links. So according to your solution i should have another coloumn with link to each page which is cumbersome task i think ?
id page parent
1 index 02 about 13 products 14 cars 35 trucks 3
If you name the lookup the same as the real page minus the extension you can build any part of the pathway dynamically.
You will need an array to keep track of the full path at each part of the breadcrumb.
so the array would need to look like this
$bc_arr = array();
$depth_guage = 0; // this is used to measure the relative path depth
$home_not_found=true; // home is any top level page marked aa zero in the database table.
$cur_pg_name = ""; // set to a name of the current page dynamically...while($home_not_found)
// I have not tested this query, but I hope you can follow the logic. If it does not work you may need to split the logic out.
$sql = "select pr1.*, (select pr2.page from page_relations as pr2 where pr2.id=pr1.parent) as parrent_name, (select pr2.parent from page_relations as pr2 where pr2.id=pr1.parent) as grandparent from page_relations as pr1 where page='".$cur_pg_name."'";
$rst = mysql_query($sql) or die(mysql_error();
$row = mysql_fetch_row($rst);
// if the grand parent is == 0 then stop the loop.if($row['grandparent']==0)
//.. build and assign breadcrumb link to array. see below//.. also include parent link
//...build and assign breadcrumb link to array. see below//...assign parent name to $cur_pg_name
// you are below, this should be in the if/else of the loop//...each pass
array_push($bc_arr,"<a href='".str_repeat("../",$depth_guage).$row['page'].".php'> > ".$row['page']."</a>");
once you are out of the loop that builds your breadcrumbs you can step back though it and echo the results.
again I have not tested this code, but it is the general idea on how I have done it in the past.
Though you said that you don't have a site-map, does your site have a defined directory structure? For example, if you have a "news" module, are they in a directory like "/news/january/xxxx.php"? If that is the case, then you can use the request URI and explode it on the slashes. From there you can infer the breadcrumb depth. Of course, there are always exceptions, so I've used that in conjunction with a variable defined in an include file $breadcrumb, and then set that to be whatever breadcrumb I want. When it comes time to render it, I just check to see if that $breadcrumb variable is set. If it is not set, then use the directory structure, otherwise use the overridden value.
I'm sure there are many other ways, but this was quick and easy provided the directories make sense.
I have a HTML page which sends lots of field values(more than 100) to a PHP page to be INSERTed into Database.
Because of the huge number of fields, I decided to GET Variables and their values via Decoding URL. This works! But the problem is:
As it will be ECHOed, the Query is alright but the INSERT is not done!
It should be cited that I do manual INSERTing in this page, so there isn`t any problem with CONNECTION, DATABASE, TABLE and etc.!
plz help me! It is walking on my nerves!
Here is my PHP code:
I am trying to submit a form on my page. It's proving to be a very difficult and frustrating task.
The problem is that there is no way of telling how many 'fields' will need to be submitted. The user might add 50 products to the cart, and make 30 changes to the quantities, or they might add 600 products to the cart and make 599 changes to the quantities (you never know), and with this website, the client is expecting high volume of sales so I need to be prepared for cases such as that.
I have a Table (a script that I bought) which has its own form tag for the data inside the table, however it uses GET not POST. And I am using:
foreach($_GET['items'] as $p=>$q)
// Update in database. This sql query has been tested, so I know it works, which means that the problem lies within the foreach loop, since it only stopped working when I added the foreach loop to update all form fields.
But I dont know how to do this. I have tried hundreds of variations of the above snip and NOTHING has worked for me.
I have searched all ovver php.net, google and am out of ideas, and would greatly appreciate anyone's advice or help.
But seriously, what do you want to know. We need some information as to what you are getting stuck with. And keep in mind that you will have to partner up with a payment provider to be able to charge using credit card or debit card (like PayPal, GlobalCollect, Bibit, etc...)
Once you are approved by one of them I guess you can start implementing their API to process payments.