cuk
Forum Replies Created
-
Forum: Everything else WordPress
In reply to: jquery $.postHm, I read it and tried to alter the code, but it didn’t work…
Any further help would be greatly appreciated.Forum: Everything else WordPress
In reply to: jquery $.postI’m getting this:
Fatal error: Call to a member function insert() on a non-object in /home/a2865846/public_html/wp-content/themes/twentyeleven-dijete/trazilica_jedan.php on line 4
This is the whole code from trazilica_jedan.php
<?php if (isset($_POST['znamen'])){ $lepo = $_POST['znamen']; $update = $wpdb->insert('users', array('user_id' => 12, 'uporabniki' => 'trajj'),array("%d", "%s")); echo "$update"; } else { echo "napaka! :("; } ?>
It is activated from the template file trazilica_dva.php. This is the part:
$.post('https://sklopnjak.uni.me/wp-content/themes/twentyeleven-dijete/trazilica_jedan.php', {znamen:znamen},function (data){ $('#save_status').text(data); });
Some ideas?
Forum: Everything else WordPress
In reply to: jquery $.postForum: Fixing WordPress
In reply to: How to make a submit button look like a normal link?Thanks! It works ??
Yep, everything done on a child theme.Forum: Fixing WordPress
In reply to: How to make a submit button look like a normal link?https://bojiste.uni.me/?page_id=72&id=0&upis=refer
buttons with regular, regular (font), regular expression
Forum: Hacks
In reply to: echo returns "Array"I had problems with picking the right array type. Works with associative. Thanks!
Forum: Hacks
In reply to: echo returns "Array"Thanks, but I bumped into another problem. The previous piece of code was written in a page template together with an HTML form. I didn’t know which URL to put into the action attribute, so I made a new PHP file called database_list.php (in the child theme folder):
<?php if (isset ($_GET['upis'])&&!empty($_GET['upis'])){ $upis=$_GET['upis']; $mocnesi=$wpdb->get_var("SELECT engleski, prijevod FROM rjecnik WHERE id = $upis"); echo $mocnesi; } ?>
And I moved the form code into the main page:
<form action="database_list.php" method="get"> Upisite rijec! Trazena rijec: <input type="number" name="upis"> <input type="submit" value="Trazi"> </form>
I don’t know how to return the $mocnesi value found by the query to html to display. Any help?
Forum: Everything else WordPress
In reply to: DictionaryYes. No luck for now.
If I understand well, most practical way to do it would be by uploading the dictionary to the mysql database and then creating a php file that connects WordPress with it…
Any thoughts?
Forum: Everything else WordPress
In reply to: DictionaryI have. Unfortunately they are not so convenient if a dictionary has 2k+ entries.
I don’t know what exactly I expected from making this topic – I simply hoped someone could share a tip, give me a general guideline or point me to a tutorial :/Forum: Everything else WordPress
In reply to: DictionaryI thought WordPress would be an adequate platform for that. I mean for making such a dictionary.