-
Began Watching How does Gutenberg render HTML with bindings?
Hello All, I have a question regarding Gutenberg React. I'm familiar with React which is what leads me to not understanding how the process works. React can only render JSX … -
Replied To a Post in How does Gutenberg render HTML with bindings?
Thanks for the reply. I'm not actually looking to build gutenberg blocks. I'm trying to understand how from a React perspective how it actually functions. Sorry for the confusion. Josh -
Created How does Gutenberg render HTML with bindings?
Hello All, I have a question regarding Gutenberg React. I'm familiar with React which is what leads me to not understanding how the process works. React can only render JSX … -
Endorsed pzuurveen
-
Endorsed Dani
-
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
Glad to hear it :) -
Replied To a Post in Use checkbox with jquery and ajax to update database
Form: <form id="myform" method="post" action=""> <input type="checkbox" class="ids" name="ids[]" value="1"> <input type="checkbox" class="ids" name="ids[]" value="2"> <input type="checkbox" class="ids" name="ids[]" value="3"> <input type="checkbox" class="ids" name="ids[]" value="4"> </form> <div id="response"></div> <script src="https://code.jquery.com/jquery-3.6.0.min.js" … -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
I tested this while in a meeting so fingers crossed it works for you: <?php $ip_ranges = "63.119.179.0/24, 23.119.180.0/24,154.119.181.0/24,193.119.182.0/24,133.119.183.0/24"; function multiCidrToRange($cidrs) { $return_array = array(); $cidrs = explode(",",str_replace(" ","",$cidrs)); foreach($cidrs … -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
Got meetings for the next couple of hours. I'll post something as soon as I get chance -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
OH I see. That won't work then. Let me look up the calculations for the range -
Replied To a Post in Searching the files in the folder and opening the related file.
You could create a custom plugin for this. Would need to know more about where the files are hosted and where you retrieve the student number from. -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
So if you var_dump the text field and it's an empty array it implies it has nothing in the textfield. I need to see more of how it's implemented -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
What does `$pluginData` hold? if you pass a list of comma separated range values to the function it will return an array of ip addresses from all of the ranges -
Replied To a Post in Use checkbox with jquery and ajax to update database
That's becuase the trigger is bound to the FORM element so when you use `$(this)` a little later on, you're refering to the form and not the checkbox. The form … -
Replied To a Post in Use checkbox with jquery and ajax to update database
I adapted you ajax method to this and it works: $.ajax({ url: "test.php", type: "post", data: $(this).serialize() + "&state=" + state }).done(function(data) { $('#response').html(data); }); -
Replied To a Post in Use checkbox with jquery and ajax to update database
`$state = (int)$_POST['state'];` Refers to a post variable that has not been passed -
Replied To a Post in Use checkbox with jquery and ajax to update database
Did you put it outside of this logic? var_dump($_POST); // Here if (isset($_POST['ids'])) { $id_value = $_POST['ids']; $state = (int)$_POST['state']; foreach($id_value as $check) { $sql_check = "UPDATE toggle SET status= … -
Replied To a Post in Use checkbox with jquery and ajax to update database
Try var dumping the $_POST object var_dump($_POST); If this returns nothing then you know there is an issue with the reference back to the data that was sent -
Replied To a Post in Use checkbox with jquery and ajax to update database
Yep so what does the response on the "Network" tab say? You should be able to click the request and it'll open another panel with headers and you want the … -
Replied To a Post in Use checkbox with jquery and ajax to update database
You can use console.log() within the trigger call $('#myform').click(function() { console.log("Click event triggered"); in order to see if the trigger is ran through the console. If you click the "Network" … -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
Something like that <?php $ip_ranges = "32.89.178.30/24, 63.119.179.0/24, 23.119.180.0/24,154.119.181.0/24,193.119.182.0/24,133.119.183.0/24"; function multiCidrToRange($cidrs) { $return_array = array(); $cidrs = explode(",",str_replace(" ","",$cidrs)); foreach($cidrs as $cidr) { $begin_end = explode("/",$cidr); $ip_exp = explode(".",$begin_end[0]); $range[] … -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
Give me an 20 mins and I'll write something for you. Just got to finish what I'm on and push to live -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
$cidrs is not defined yet. This would be for instance explode(",",$my_form_field) passing an array of ranges -
Replied To a Post in Use checkbox with jquery and ajax to update database
What results have you had so far? -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
function cidrToRange($cidr) { $range = array(); $split = explode('/', $cidr); if(!empty($split[0]) && is_scalar($split[1]) && filter_var($split[0], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { $rangeStart = ip2long($split[0]) & ((-1 << (32 - (int) $split[1]))); $rangeStartIP = … -
Replied To a Post in How to get IP from text area that contains multiple IPs and their CIDR?
If theres discrepencies with spaces etc. I'd consider $ips = explode(",",str_replace(" ","",$field)); // Gives IP's foreach($ips as $key => $ip) { $range = explode("/",$ip); $ips[$key] = $range; } which will … -
Replied To a Post in ReactJS Frontend with CodeIgniter backend - How to keep Authentication?
Because React does not carry out a page refresh the cookie storage that React has access to is outdated. The best method for React & PHP authentication is to use … -
Replied To a Post in Google problem with .htaccess
What did you change? -
Replied To a Post in Help needed with Mysql_update query
The usual way of achieving this functionality is to store a reference to the current player through a token/cookie and use that to refer to the related row in the … -
Replied To a Post in How to update database value with checkbox using jquery and ajax
This is quite an ambiguous question. Can you elaborate on exactly what you're trying to achieve? -
Replied To a Post in Bootstrap carousel
From what I can see, you're short a closing <div> tag. -
Replied To a Post in Database Design Help
I don't have access to my suppliers database however each part will be populated from their website listing of that product, so when I add that product to the database … -
Replied To a Post in redirect in another tab
Like @minitauros said, change the `header("Location: $file \r\n");` line with something like: `echo '<script type="text/javascript">window.open(' . $file . ')</script>';` See if that works. -
Replied To a Post in isset() not working in php
I'm a little confused as to why you want so much information to log someone in. Do you mean register? You say you get 1 extra error? So this doesn't … -
Created Database Design Help
Hello all, I'm trying to build a system to provide an easy access but very clever service select (sounds confusing, I will explain). Essentially I'm trying to create a system … -
Replied To a Post in Complicated 301 redirects in wordpress
You could always user Apache's .htaccess RewriteEngine -
Replied To a Post in auto generated email
Because you shouldn't usually save a users password in the raw format, but instead save it as an ecrypted version using something like md5() you can't physically retrieve the users … -
Gave Reputation to diafol in send form to another page and redirect to the same page
If you have a reusable form, I suggest that you have a php file just for the form (let's call it form.php for now). The form then has a hidden … -
Replied To a Post in Image Commenting, Liking and following
What exactly are you asking from us? -
Replied To a Post in PHP & MySql Framework
Thanks guys ;) -
Began Watching PHP & MySql Framework
Hello All, I wonder if someone could help me, I'm about to start work on a pretty heavy system that will be massively database driven. I was wondering if there … -
Replied To a Post in PHP & MySql Framework
Pretty much yeah... -
Replied To a Post in PHP & MySql Framework
I took a look at cake but it's too intrusive, I'm looking for a a non-intrusive framework that just gives me a class to communicate with the database instead of … -
Edited PHP & MySql Framework
Hello All, I wonder if someone could help me, I'm about to start work on a pretty heavy system that will be massively database driven. I was wondering if there … -
Created PHP & MySql Framework
Hello All, I wonder if someone could help me, I'm about to start work on a pretty heavy system that will be massively database driven. I was wondering if there … -
Replied To a Post in PHP specific row select?
if ($channel_name6 = 'post') { $channel_name2 = $channel_name2; } else { $channel_name2 = "<img src='/videobox/data/uploads/images/$channel_name2' height='200px' width='100px'>"; } Correct me if I'm wrong but are you not trying to see … -
Replied To a Post in Collecting IP Addresses
And to add to this. Like @jkon said, it will be the ISP's designated IP for that client. In most cases everytime your router connects to the ISP it will …
The End.