Project / Support Center
Welcome, %1$s. Please login or register. February 28, 2024, 11:17: AM
Web Global Net Web Application & Web Development Project Center  | 
: 1 [2] 3 4 5 6 7 ... 10

 : May 25, 2021, 08:33: PM 
admin - admin
http://<?php echo $_SERVER['HTTP_HOST'];?><?php echo $_SERVER['REQUEST_URI'];?>

will produce

most likely an easier way to do this but this works too

 : May 24, 2021, 08:12: PM 
admin - admin
This is not a question but rather some insight on creating a button which you can edit on the fly without creating a new on Paypal for each item your selling.
A lot of people want to use a manual html/java code for buttons for that reason but cannot seem to find the info.
There is help on Paypal and Merchant Services and Web Development and after much searching and putting it all together I came up with a solution, an editable custom code of my own. Here is it explained below. I hope this helps some of you. For this example, I'm using a shopping cart button. With this code, Paypal automatically generates a standard shopping cart. You can use custom checkout pages or add your logo, banner, etc to the cart by setting it up in your account Profile. (this example is a fictional company)
<form target="paypal" action="" method="post">
<input type="hidden" name="business" value="">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="item_name" value="blue table">
<input type="hidden" name="quantity" value="1">
<input type="hidden" name="amount" value="365.00">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="shopping_url" value="">
<input type="hidden" name="cancel_return" value="">
<input type="hidden" name="return" value="">
<input type="image" name="addtocart" border="0" src="" alt="add this item to your shopping cart">
It all breaks down like this:
Code calls up Paypal server with instructions:
<form target="paypal" action="" method="post" target="new">
This one tells Paypal who's getting paid (business variable). Instead of using your Paypal account email, it's better to use your merchant id number, located at the top of your Account Profile page under your name but you can use your email address and it will work to send the funds from the sale to your account:

<input type="hidden" name="business" value="">
This one tells PayPal that it's a shopping cart:
<input type="hidden" name="cmd" value="_cart">
This one instructs Paypal to add one (1) item to the shopping cart:
<input type="hidden" name="add" value="1">
This one gives the item description or title:
<input type="hidden" name="item_name" value="product name here">
This one tells Paypal that there is only 1 item and not to sell it again. For more than one item, adjust the "value."
<input type="hidden" name="quantity" value="1">
This one tells what price to charge the customer:
<input type="hidden" name="amount" value="395.00">
This one instructs how to charge shipping: (I offer free shipping so I use the "no_shipping" variable)
Value of "0" equals no shipping charges, customer address optional.
Value of "1" equals no shipping charges, do not collect customer address.
Value of "2" equals no shipping charges, customer address required.
<input type="hidden" name="no_shipping" value="2">
This one tells Paypal that the currency is United States Dollars:
<input type="hidden" name="currency_code" value="USD">
This one tells where to send the customer if they click "Continue Shopping" button in cart:
<input type="hidden" name="shopping_url" value="">
This one tells where to send the customer if they cancel their purchase or checkout:
<input type="hidden" name="cancel_return" value="">
This one tells where to send the customer after they complete their purchase and payment: It's a good idea to have a thank you or confirmation page that matches your site to bring the customer back to after checkout otherwise Paypal sends them to a Paypal page. I want them back on my site so I have a confirmation page set up.
<input type="hidden" name="return" value="">
This one tells where to find the "Add to Cart" or "Buy" button: (I'm using the Paypal small button here. To use your own button, simply change the image file address (src variable) to your location and image file)
<input type="image" name="addtocart" border="0" src="" alt="add this item to your shopping cart">

So now I have a working and workable button code which I can simply edit on the fly instead of creating new buttons on Paypal for each item.
If you need other code variables for different functions, you can find them here:
Each function will be listed as an input(<input). To use the code you only need to edit/change the "Value" variable in each code. In my code each input is "hidden." The only one to be displayed will be the image unless your using selection drop down menus or other "option"s such as size, color, etc. Those variables are found at the link above also.
It's just that easy. For other button or checkout features, refer to the link above. All the variables will work on all types of buttons (shopping cart, buy now, subscribe, donate, etc).
I hope this helps some of you. If you want, you can copy my code and edit it with your account id, items, prices, etc.

 : April 12, 2021, 06:04: PM 
admin - admin
good place to get coding for symbols and things

 : February 20, 2021, 04:05: PM 
admin - admin
Spent about an hour looking for this answer, all the solutions we found required a JavaScript solution. But it doesn't, just add the red code to your <li> tag

Couldn't believe how simple this was to do.

<li  class="tab-btn" onclick="location.href='template.php?acct_id=<?php echo $_GET['acct_id']; ?>';">Social Media</li>

<a class="btn btn-success" href="" target="_blank">Google[/url]

And use target="_blank" to open the link in a new tab.

 : January 20, 2021, 07:00: PM 
admin - admin
This won't change columns or row settings but its the first thing I've found that quickly handles scaling of a table in a responsive manner. Not meant for big tables either.

"<table width="90%" border="0" class="table_text">"

.table_text { font-size: 12px; }

@media screen and (min-width: 480px) {
  .table_text { font-size: 9px; }
@media screen and (min-width: 640px) {
  .table_text { font-size: 12px; }
@media screen and (min-width: 1024px) {
  .table_text { font-size: 14px; }

 : December 30, 2020, 08:15: PM 
admin - admin


<button onclick="window.print()"><img src="assets/icons/print_button.png" alt="Print Quote" width="100"></button>


<button onclick="window.print()">Print</button>

 : December 02, 2020, 08:47: PM 
admin - admin
This is universal the scale can be changed to affect the size of the box itself - other css control may or may not work test them yourself to see what will work.

input[type=checkbox] {
   transform: scale(1.375);
   margin-left: 5px;
   margin-right: 10px;
   margin-bottom: 10px;

 : November 24, 2020, 08:48: PM 
admin - admin
my server was 5 hours ahead and I needed to store the fixed local time ( meaning no other time zones would be needed)

<?php $hour= date('g'); ?>

<?php $time= $hour-5 ?>

Bold is the hour - $time takes the hour and subtracts 5 hours - change this to what ever you need to to match your correct time.

this is the value used in a text field

 value="<?php echo date('F') ?> <?php echo date('d') ?> <?php echo date('Y') ?>  - <?php echo $time ?>:<?php echo date('i') ?> <?php echo date('a') ?>"

This will insert into a text field in this format (we use this to show when someone last updated a record).

November 24, 2020 - 3:24 pm

 : October 21, 2020, 07:31: PM 
admin - admin

This will show a Lightbox pop up window for a ll photos or video listed in a apache server directory

 : September 21, 2020, 11:20: PM 
admin - admin
When you use it as a dynamic variable it will be entered into your script or email as {SERVER.HTTP_HOST}

It returns the URL in to access the page which is executing the script.
If you need to type to access the page then $_SERVER['REQUEST_URI'] returns /product.php?id=5″.

Returns the root directory of the server which is specified in the configuration file of server.
This variable usually returns the path like /usr/yoursite/www in Linux and D:/xamps/xampp/htdocs in windows.

Returns the hostís name as found in the http header.
This variable usually returns the path like when you find in browsers address-bar and return when you see in the address bar.

This is quite useful when you've to preserve session while making an online payment using PHP since session stored for is not same as for the

Returns the user agents (browser) detail accessing the web page.
We can use strpos($_SERVER["HTTP_USER_AGENT"],MSIE) to detect Microsoft Internet explorer or you can use strpos($_SERVER["HTTP_USER_AGENT"], Firefox) to detect firefox browser in PHP.

Returns the file-name of the currently executing script.
Letís suppose that youíre accessing the URL then $_SERVER['PHP_SELF'] returns /product.php in your script.

Returns the query string if query string is used to access the script currently executing.
Query strings are those string which is available after the ? sign. If you use $_SERVER['QUERY_STRING'] in the script executing the following URL then it returns id=5&page=product in your script.

Returns the IP address of remote machine accessing the current page.
But you canít relie on $_SERVER['REMOTE_ADDR'] to get the real IP address of clientís machine.

Returns the absolute path of the file which is currently executing.
It returns path like var/ in Linux and path like D:/xampp/xampp/htdocs/test/example.php in windows.

: 1 [2] 3 4 5 6 7 ... 10
Web Global Net Web Application & Web Development Project Center  | 

Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!
Sorry, the copyright must be in the template.
Please notify this forum's administrator that this site is missing the copyright message for SMF so they can rectify the situation. Display of copyright is a legal requirement. For more information on this please visit the Simple Machines website.