Questions tagged [PHP] (40486)

1
answer

How to add button with link Telegram?

Hi. I need to message to add a button-url. How to do it? message_to_telegram function($text) { $ch = curl_init(); curl_setopt_array( $ch, array( CURLOPT_URL => 'https://api.telegram.org/bot' . TELEGRAM_TOKEN . '/sendMessage', CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_TIMEOUT => 10, CUR...
brendon.Muller26 asked April 19th 20 at 12:46
2
answers

How to call a class?

Hi. Writing a library for VC, and then the question arose. I want to make it a regular class for working with messages, and an additional class for working with images. Actually, what class should I call? It seems to me that if I want to call VK_Image, and will be called VK (that makes sense rofl), but VK_Image not have a...
cielo.Cartwright asked April 19th 20 at 12:45
0
answer

How to do sorting of products in the CMS Netcat?

Good day to all. Tell me how to do the sorting of the list of goods to Netcat on the number in reverse order? $sort_dir = $nc_core->input->fetch_get('sortDesc')? 'DESC' : 'ASC'; $price_column = "Price"; $sorting_methods = array( "=> array('query_order' => "`Vendor` $sort_dir, `Name` $sort_dir", 'title' =>...
Joesph.Frami asked April 19th 20 at 12:45
1
answer

How to display popup for contact form 7?

good day, used wordpress - contact form 7 fields in a modal window when the form is submitted if all fields are not filled in, you need to re-open the modal window to see the error, can it be placed in a separate modelku? Or maybe there are existing plugins to solve this problem. I tried to use the plugin Contact Form 7 Pop...
Jovanny.Von asked April 19th 20 at 12:45
1
answer

How to make the generation of html pages using mysql?

I'm still new to this area, so do not scold. For example there is already a ready template and a database, how to do so when put the new data into the database, was taken as a template and create the final html for example: The title is written Habr - after the html is created with the name habr.html. This question is of co...
Lisandro.Sta asked April 19th 20 at 12:45
1
answer

How to implement admin area for multiple users?

When you add a new user in the admin role (such as "admin2") old admin (admin1) can not enter under the status of administrator. The entrance is under the status of a user <?php session_start(); require('connect.php'); if (isset($_POST['username']) and isset($_POST['password'])){ $username = $_POST['username']; $pass...
ott asked April 19th 20 at 12:45
1
answer

Reset the $_POST after submitting a save session?

Good day! There is a form that is processed on the same page. After you submit the form to a variable the result is written and displayed in the code below. The question is: if after sending the form to do a redirect via header(), how to preserve the value of the variable on successful send? If you use the session variab...
Richie asked April 19th 20 at 12:44
0
answer

The site works on the test server localhost:8000. How to create .htaccess to run on a remote server?

When you start the site, use the run()function public function run ():self { $match = $this->router->match(); $view= $match['target'] ; $params= $match['params']; $router= $this; $isAdmin= strpos($view, 'admin/') !== false; $isUser =strpos($view, 'user/') !== false; if(!$isAdmin && !$isUser){ $layout ...
Shanny asked April 19th 20 at 12:44
1
answer

How to do a redirect after sending the form to a modal window?

Hello! Ransacked all sources of information and do not understand... How after you submit the form to call a modal window? Form: spoiler <form class="forma" action="order.php" method="post"> <div class="form-row"> <div class="form-group col-md-6"> <input type="text" name="name" class="form-control"...
Burley asked April 19th 20 at 12:43
1
answer

How to connect to the database — Heroku+PHP+to do so,+Sqlite?

Can't connect to database on local everything is OK. spoilerrequire_once(__DIR__ .'/db/rb-sqlite.php'); R::setup('sqlite:'.__DIR__.'/db/database.sqlite'); ps. Yes, sqlite on heroku.
Stacy83 asked April 19th 20 at 12:43