39,319 Topics

Member Avatar for
Member Avatar for davBro
Member Avatar for pritaeas
0
24
Member Avatar for charlie_20

> Hi, I'm having trouble coding the if/else statement. No matter what value the expiry has, line 17 is echoed. If it is =>1 I want to sysnav.html. <?php $link = mysqli_connect("localhost", "root", "", "homedb"); // Check connection if($link === false){ die("ERROR: Could not connect. " . mysqli_connect_error()); } //MySqli …

Member Avatar for wwwalker
0
119
Member Avatar for ivan3510

Hi! I want to convert numbers to letters, in this way: A=0, B=1, C=2... Z=25, AA=26,AB=27 etc (something like the names of columns in MS Excel). How to do that? Thanks a lot!

Member Avatar for SAbadshah
0
12K
Member Avatar for ___150

Is this code correct? Or should I keep using } else { for (errors) until the end? if ($y = $link->prepare('SELECT id, password FROM usuarios WHERE username = ?')){ $y->bind_param('s', $_POST['username']); $y->execute(); $y->store_result(); if ($y->num_rows > 0){ echo 'Username exists, please choose another!'; } else { if ($y = $link->prepare('SELECT …

Member Avatar for Reverend Jim
0
143
Member Avatar for ___150

Hi,This code creates a friendly link on user mentions in comments... However, it is not case sensitive and vice versa. Examples; @test works @Test doesn't work The regular expression takes both values. But the query is not catching. I figured it would be a case-sensitive collation on the database. But …

Member Avatar for gce517
0
136
Member Avatar for ___150

Hi, Is it possible to convert the first letter after @ to uppercase using preg_replace? I tried; preg_replace('/\@(\w+)/', 'ucfirst("$1")', $str) But nothing changed when I sent it... 😞 Already like that... It worked, but I don't know how to add the @ before the name that will be converted. $str …

Member Avatar for gce517
0
62
Member Avatar for RC_820

hii how can i convert this yyyy-MM-dd HH:mm:ss.SSS to 2021-05-18T22:48:07.252-04:00 in php

Member Avatar for gce517
0
19
Member Avatar for ___150

Hi,This code creates a friendly link on user mentions in comments... However, it is not case sensitive and vice versa. **Examples;** **@test** works **@Test** doesn't work What do I do? text = "@test @Test"; $pattern = "/\@(\w+)/"; preg_match_all($pattern,$text,$matches); if($matches){ $sql = "SELECT * FROM users WHERE username IN ('" .implode("','",$matches[1]). …

Member Avatar for ___150
0
114
Member Avatar for newstart
Member Avatar for borobhaisab

Hi, I get the feeling from this forum that simplehtmldom is old stuff. Nevertheless, experimenting with it since a simple tutorial code depends on it. Check this Xml SItemap Link Extractor include_once('simplehtmldom_1_9_1/simple_html_dom.php'); //Works. //$sitemap = 'https://www.rocktherankings.com/post-sitemap.xml'; //$sitemap = "https://www.rocktherankings.com/sitemap_index.xml"; //Has more xml files. //Does not work. Shows blank page. $sitemap …

Member Avatar for Dani
0
212
Member Avatar for borobhaisab

Hello, I am building a searchengine with php. Nearly finished. Now, I need to build the web crawler. Since most websites have xml sitemap for web crawlers to use to find their site links, I prefer to build an xml site map crawler than a general http crawler. I am …

Member Avatar for Dani
0
648
Member Avatar for borobhaisab

I am still at procedural style programming. And so, oop code samples confuse me. I found this oop style. Any chance you can show me how to convert this to procedural style ? Test the code. It woks fine! https://bytenota.com/parsing-an-xml-sitemap-in-php/ // sitemap url or sitemap file $sitemap = 'https://bytenota.com/sitemap.xml'; // …

Member Avatar for borobhaisab
1
536
Member Avatar for HaryBanker
Member Avatar for 145493ka

Hi there i have a problem with my cart calculations in a website i am making and it only displays the last price of the item i add to tthe cart instead of the total of all items added <?php $select_cart = mysqli_query($conn, "SELECT * FROM `cart`"); $grand_total = 0; …

Member Avatar for gce517
1
176
Member Avatar for Stefce

I want to get a string from different website and to display on mine. The website have this HTML code inside it <ul data-v-61cbae47="" class="b-tabs__nav m-tabs-default m-flex-width m-size-md m-mb-reset js-tabs-switchers m-over-separator"> <li data-v-61cbae47="" class="b-tabs__nav__item m-current"><a data-v-61cbae47="" href="/jenawolfy" aria-current="page" class="b-tabs__nav__link m-with-rectangle-hover m-tb-sm router-link-exact-active router-link-active" id="profilePostTab"><span data-v-61cbae47="" class="b-tabs__nav__link__counter-title">130 posts</span></a></li> <li data-v-61cbae47="" class="b-tabs__nav__item"><a …

Member Avatar for rproffitt
1
150
Member Avatar for Stefce

I am trying to make to display cells in a database that are not empty, i have URL links with images inside the table and i want to display only the cells that are not empty. For example if there is only 2 pictures added in the database i want …

Member Avatar for gce517
1
117
Member Avatar for Stefce

I am trying to insert into table with PHP and MySQL but the page only refresh it self when i press the button. I haven't done debugging, i have an IF statement that displays any errors that fires if the SQL query have errors. But the thing is even the …

Member Avatar for gce517
1
210
Member Avatar for Vandiun

I'm new to Codeigniter and hope to learn best practices as I go. I currently have a table generated by DB. HTML Table: <tr> <td> <a class="galName" href="#myModal" data-toggle="modal" > <?php echo $gal['name']; ?> </a> </td> <td> <?php echo $gal['clientName']; ?> </td> </tr> <?php endforeach; ?> The Modal: <div class="modal …

Member Avatar for Dani
2
605
Member Avatar for Nine_2

I'm wondering how to update my database using a modal and multiple data from another form. This is how it looks like, ![1.png](https://static.daniweb.com/attachments/4/9f1a52cdeffddb99e65e6d73d8febd7b.png) When you click any checkbox there, the release request button will enable. ![2.png](https://static.daniweb.com/attachments/4/1db9299fc8e0995c48be16f9b41f4cc0.png) When it was clicked there's a modal will pop up: ![3.png](https://static.daniweb.com/attachments/4/4bc7fe8fc346f118c3c3282c341ac6bb.png) Now, the modal …

Member Avatar for devphp
1
645
Member Avatar for aibreansiyue

So, I have made a table called `supplies_table` and inside the table is `id`, `name`, and `files`. And I also made an upload button where it can upload a pdf BLOB file into the `files` column. Yes, it can upload a pdf file in the `files` column but the problem …

Member Avatar for gce517
0
131
Member Avatar for borobhaisab

Hi, I used to know how to do this but forgotten. How can I check the extension of a url ? You see, sometimes sitemap xml files do not list site urls (.html) for my crawler to extract all the urls. Instead, they list further xml files and so my …

Member Avatar for borobhaisab
0
154
Member Avatar for devphp

Hello all. I am trying to use four modals in codeigniter. Main page has four simple links, each of them pops up its modal. Then each modal has a form with upload image, this means main page requires four images which would be uploaded through modals. The upload form is …

0
174
Member Avatar for Freetrendz
Member Avatar for gce517
1
75
Member Avatar for codesparrk
Member Avatar for rproffitt
0
8
Member Avatar for Bidesh

What are the programming languages needed to learn to create a movie website? The movie website should also be capable to upload new movies. I have included php, javascript, and jQuery already.

Member Avatar for Dani
0
76
Member Avatar for Bidesh

I want to develop a social media website. So can anyone tell me the what are the programming languages needed for it? I have already included php, javascript and html. Can you suggest me with any powerful js library?

Member Avatar for odeskavita
0
84
Member Avatar for gunnarflax

I've read tutorial on tutorial and I try to work with Object Oriented PHP but the thing is that I find it rather complex. When I create a class I must include it in the current working document. It doesn't work as in Java when the compiler finds the script …

Member Avatar for odeskavita
1
534
Member Avatar for jj.dcruz

I have this code foreach loop it will get the first data form my table every iteration on the next output. I would like to have a guidance on this <select class="selectpicker form-control" data-live-search="true"> @foreach ($IncidentTypes as $Incident) <optgroup label="{{ $Incident->incident_type ." ". $Incident->id }}"> @foreach ($Incident->IncidentSubType as $subTypes) <option> …

Member Avatar for Dani
1
229
Member Avatar for Ahmad_74

Hi ppl I want to known about the availability check of hall booking I'm developing a website which is based on the venue booking system but i want to add availability chrck form in it so the same hall not booked at the same start time or same date There …

Member Avatar for rproffitt
0
34
Member Avatar for jyotiu

Hi ppl I am developing website for my friend's very small resort, please see [url removed] this resort have 8 rooms in total and all rooms are of same type so every room is equally priced. I just need code or logic to check availability of given [B]no. of rooms[/B] …

Member Avatar for Ahmad_74
0
2K

The End.