Skip to content

Tag: php

Regex letters are not allowed when they should be?

My and my group are trying to create a simple PHP code editor that also executes the code without the use of a library. We know the risks that come with eval(), but since it’s all running on a local server it shouldn’t be a problem. The Regex part is definitely the problem since we have no clue ho…

Limit Comment in Post Laravel

So this is the problem, I have application with post and comment. But I want to limit the comment per user, So if there is 1 post only 1 comment per user. Is it possible ? Here is my store function in CommentController: What query can I add in this store function to limit the user to only comment once

Substract an amount of time to an addition of times

I have to substract 32:30:00 (string) to 95:05:00 (string) in php : THey are coming from an addition of time . I can’t find any code working, cause strtotime doesnt accept more than 24 as a value . Please help me, thank you. For example, i ve tried this : It returns 0 It should return something like 62:…

PHP not returning Ajax Call

I’m trying to send over the data from my textarea using an ajax call to my PHP file, but we aren’t getting any response back from the PHP file. — # Answer # — I thought I had already tried an echo in this piece of code, but I think I just missed the output on the webpage and thought