Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~22.7K People Reached
Interests
C++
Favorite Tags
Member Avatar for Martin C++

Hello I need to filter data from database. Use selects the data he need from selectboxes and inputs. Not all inputs must be filled. Those that arent have value of -1. I have put together a SQL statement that should work. Probably would work without the prepare but I need …

Member Avatar for Martin C++
0
244
Member Avatar for Martin C++

Hello, Not really sure if this is the right place to post this to but I am pretty sure I need js to accomplish this. I need to make a dropdown selection menu for my wordpress theme options, but I can't use the conventional `<select>` tag because I want my …

Member Avatar for almostbob
0
841
Member Avatar for Martin C++

Hello, I have a div that contains small posts, it grows automatically. When size is too big then the scrollbar apepars with CSS overflow property. What I want is that when more data is added then the div is automaticall scrolled down to it BUT when user decides to scroll …

Member Avatar for Martin C++
0
4K
Member Avatar for Martin C++

Hello, I have a small problem with my script. The ajax calls php file but it wont finsih successfully. Instead it goes to error: callback. My javascript part: function updateUserlist(){ $.ajax({ type: "POST", url: "process.php", data: {"function": "userList", "n_users": n_users}, dataType: "json", success: function(data){ console.log("Updating..."); $("#users-list ul").append("<li>"+data.text['nickname']+"</li>"); n_users = data.numUsers; …

Member Avatar for Martin C++
0
167
Member Avatar for Martin C++

Hello, I made a class to connect with database but now I have run into a little problem. I need to get the id of last inserted row, but I dont know how to accomplish it. Here is my connection class: <?php class Connection{ public function __construct($config){ $this->mysqli = new …

Member Avatar for Martin C++
1
150
Member Avatar for Martin C++

Hello, I want to delete a user from database and destroy the session after he has been idle for some time, lets say 5 mins. How can I do that ? For starters, how to check if the user is idle? I need it mainly for when a user closes …

Member Avatar for pritaeas
0
210
Member Avatar for Martin C++

I want to check if nickname contains only numbers and letters. It cant contain anything else. My current code is not working because as soon as I type in atleast one legal lettrer, the entire string evaluates to true every time I check, no matter how many illegal characters it …

Member Avatar for Martin C++
0
183
Member Avatar for Martin C++

I have a weird problem. I try to add two strings together but instad the variable evaluates to 0. Why is this happening and how to fix it ? <?php require_once('config.php'); $connect->query("SELECT id, name FROM room"); $rooms = $connect->get(); print_r($rooms); $result = "<ul>"; $asd = "Test"; /* foreach($rooms as $room …

Member Avatar for IIM
0
100
Member Avatar for Martin C++

Hello, I am making a calculator for school and so far I have written a code that allows user to combine and input. Calling it a formula would be wrong I think. It's like User pushesh buttons and comes up with an input like this for example : 11+4+9-5. Now …

Member Avatar for gon1387
0
393
Member Avatar for Martin C++

Hello, I have two requests to my server. The first one gets categories and the output to URL is something like this: doomain.com?category=1. The second request is meant for sorting the data in that specific category. This request outputs something like: domain.com?sort-by=name. What I need is something like this: domain.com?category=1&sort-by=name. …

Member Avatar for diafol
0
93
Member Avatar for Martin C++

Hello, I would like to know how to output potentally thousands of posts with pages. So that i can choose how many posts to display on a page and the ones that wont fit will note be generated there. instead on the bottom of the page there will appear links …

Member Avatar for rfrapp
0
84
Member Avatar for Martin C++

As you can see from the title I am interested in making a shopping cart with javascript. What it should do is allow a client to add/remove products from the cart. Increase the quantity and have a visual overview of his cart. When he is finished he would go to …

Member Avatar for AleMonteiro
0
141
Member Avatar for Martin C++

I have a content div that may very likely be shorter than sidebar div. They are both wraped in div with ID of "container". I need the content div to automatically change its height to be same tall as the sidebar. I included an image too. Regards

Member Avatar for Martin C++
0
203
Member Avatar for Martin C++
Member Avatar for Martin C++

Hello, I have a PHP page called summary.php and I m trying to make the jquery script to post piece of data when <select> is modified. This is my code atm [CODE=js] <script> $("select").change(function () { page_id=$(this).attr('id'); alert(page_id); $.post("#", {id:page_id}); }) .change(); </script> <?php if(isset($_POST['id'])){ die("YES!"); } echo $_POST['id']; ?> …

Member Avatar for Martin C++
0
193
Member Avatar for Martin C++

How to set seperate heights for <td> ? I have table with one rows and 2 cells. In one of them there is more data, so it drags the other cell longer than it should be and that's ugly. I need something that automatically adjusts the cell height according to …

Member Avatar for Martin C++
0
109
Member Avatar for Martin C++

Question in title. I need it for my PHP site to know which theme is active and I dont want to use database for it. I think it should be possible, cause wordpress doesnt have this stored in database either (I think).

Member Avatar for NinjaMediaD
0
69
Member Avatar for shielaolid

[CODE]<?php // connect to the database include('connect-db.php'); // check if the form has been submitted. If it has, start to process the form and save it to the database if (isset($_POST['submit'])) { // get form data, making sure it is valid $employeeno = mysql_real_escape_string(htmlspecialchars($_POST['txtempno'])); $employeename = mysql_real_escape_string(htmlspecialchars($_POST['txtempname'])); $position = mysql_real_escape_string(htmlspecialchars($_POST['txtpos'])); …

Member Avatar for kk.fasil
0
425
Member Avatar for Martin C++

I have a function that changes slides, I have created a pause and resume functions for it, but when the user presses resume button multiple times, then multiple instances of the script is beeing run and the images change too fast. I need to prevent this from happening. This is …

Member Avatar for Martin C++
0
2K
Member Avatar for Martin C++

Question it title, how to do it ? I need to stop a function with another function or I need to call a global function inner function with another global function so I could stop it that way. I know its possible but how ?

Member Avatar for stbuchok
0
2K
Member Avatar for Martin C++

Hello, I need to submit a form as soon as selection has been changed and call PHP function. I know I can do this with onchange="this.form.submit(); but this will generate an url similar to this: [CODE=PHP]?submit_position=change[/CODE] while I need to generate something like this: [CODE=PHP]?p=edit-product.php&action=change_pos&id=$id[/CODE] This is what my form …

Member Avatar for broj1
0
474
Member Avatar for Martin C++

Hello, I need to get two get functions from url, but I cant get the second one, how can I do it ? Something like this: [CODE=PHP] <h4><a href='?p=edit-page.php?page=$id'>$title</a></h4> [/CODE] The p will include the edit-page.php in my container which is just list of page titles and when I click …

Member Avatar for Martin C++
0
104
Member Avatar for Martin C++

start_session() after <html> tags generates error, Can it be used there somehow? If so, then how ? If not then what are the alternatives cause I have a function that generates some part of my <head></head> in my themes. So the session_start() definately has to saty in that function (e.g …

Member Avatar for diafol
0
164
Member Avatar for Martin C++

Hello, I have a function which is registering a navigation menu [CODE=PHP] function register_menu($name, $displayname){ if(!is_menu()){ $menu['name'] = $name; $menu['displayname'] = $displayname; $registered = TRUE; //This should be global, so that is_menu() function can use it. } } [/CODE] And another function which checks if the menu is registered [CODE=PHP] …

Member Avatar for Martin C++
0
124
Member Avatar for Martin C++

Hello, I need a php code that can detect the root foldername that my website is installed to. I need to use this constant in my bootstrap.php so it can't be relative to where the file is called from. Atm I have my root folder and admin folder. I need …

Member Avatar for Martin C++
0
119
Member Avatar for Martin C++

Hello, How can I make a menu for the following code [CODE=HTML] <div id="sidebar"> <ul> <li><a href="#">Master link</a> <ul> <li><a href="#">Link to be revealed</a></li> </ul> </li> <li><a href="">Master Link 2</a> <ul> <li><a href="#">Sublink</a></li> </ul> </ul> </div> [/CODE] Wit this CSS, I m hiding the second level of the menu, that …

Member Avatar for ckchaudhary
0
186
Member Avatar for Martin C++

Hello, I would like to know how to call a theme in a custom made CMS. I have some very primitive bootstrapping done (I dont really know how to do it). I have finished the functions I need and I have actually finished the theme aswell, the only problem is …

Member Avatar for Martin C++
0
82
Member Avatar for Martin C++

Hello, I want to validate this form and display error right next to the input field. [code=html] <div id="regForm"> <form action="register.php" method="POST" onsubmit="return validate(this);"id=registration" name="registration"><p> Username: <input type="text" name="username" id="username_reg" /><br /> Password: <input type="password" name="password" id="password_reg" /><br /> Repeat password: <input type="password" name="repeatPassword" id="repeat_reg" /><br /> Email: <input type="text" …

Member Avatar for Airshow
0
131
Member Avatar for Martin C++

I m not sure if thats right section, but I m pretty sure it's done with PHP. So the question is, how can I change a conetent inside a division without navigation to new page. For instance I have 4 division. Header, links, content, footer. Now if i click some …

Member Avatar for diafol
0
1K
Member Avatar for Martin C++

Probably a stupid question but why does the following loop works ? There is nothing wrong with it I just want to understand how does this code know how many entries I have in database. [CODE=PHP] $result = mysql_query("SELECT * FROM post_categories"); while ($row = mysql_fetch_array($result)){ echo $row['Name']; } [/CODE] …

Member Avatar for cereal
0
2K