
JustMike
Members-
Content Count
33 -
Joined
-
Last visited
Content Type
Profiles
Forums
Calendar
Everything posted by JustMike
-
I changed my jquery code and now I have this: $(document).ready(function(){$('.ajaxForm').each(function (){if( $(this).attr('data-id') == $('.postStreamComment').attr('data-id') ) { $('.postStreamComment').click(function(e){ e.preventDefault(); $.post( '/stream/post-comment', { commentText:$('.comment-'+$(this).attr('data-id')).val(), stream_id:$(this).attr('data-id') }, function( data ){ $('.comment-'+$(this).attr('data-id')).val('') }, 'json'
-
In the network tab i get this in the general section: And this in the form data section: Now it sends the correct id/text to the db but it redirects me to http://localscript.dev/stream/post-comment ...
-
Sorry, the typo was repaired in my file (just after posting this and I forgot to correct here too), but in the database is inserted only the id of the the last post. I'm a jquery beginner (so... probably I'm wrong, because i'm still learning), but I think it should be something like this: $(document).ready(function(){ $('.postStreamComment').click(function(){ // e.preventDefault(); $.ajax({ url: 'stream/post-comment', type: "post", data: { $('.ajaxForm').each(function(){ 'commentText':$('input[name=commentText]').val(), 'stream_id
-
Hi, I have a problem with ajax posting into db, the post_id is not inserted into db, instead is inserted 0. In the firebug console i get this message: POST http://localscript.dev/stream/post-comment 200 OK If i inspect the element with firebug the hidden input with the id is correct. I have a form looking like this: <form action="stream/post-comment" method="POST" class="ajaxForm"> <inpu type="hidden" name="stream_id" value="<?php echo $stream['id']; ?>"> <div class="col-md-10" style="padding-left: 0px;"> <input type="text" name="commentText" class="form
-
Thanks, I solved the problem. There was a error in the __construct (I had the same name for two variables) and one in the createbackup method... the final mysqldump command is this: $actualCreateBackup = "mysqldump --opt --host=".$this->dbHost." --user=".$this->user." --password=".$this->password." ".$this->dbName." > ".$this->sqlFile;
-
Hi, I'm trying to create a php class that creates a database backup but the result is an empty file. Here is my code so far: Note: The uploadBackup() method is not ready yet, I'm still trying to figure out the createbackup() method... <?phpclass dropboxbackup{ // temp directiry public $tempDir; // MySQL DB connection data (username, password, database, host and prefix) private $user; private $password; private $dbName; private $dbHost; //DropBox Information private $dropbox_user; private $dropbox_pass; private $dropbox_loc;
-
I don't know what happened, but I deleted the entire source code and uploaded it again without the .htaccess file and now works perfectly. Anyway, thanks for your help!
-
This is the code, and on the first line is the php opening tag, <?php And on the second line is this exact code require_once "include/code.php"; I changet the " with ' but it shows the same error. I checked my core.php file for errors and works, now I deleted the content of the .htaccess file and now shows a blank page what page I'm trying to access.
-
I deleted that line and now I can see only this in the browser:
-
Hi, I have a problem after I moved a site froma a webhosting company to another. After I finished moving the files and the database I had the surprise to see the php code in the browser. For example, this is my home.php file: <?phprequire_once "include/code.php";loggedinorreturn();if($USER){ if ($_SERVER["REQUEST_METHOD"] === "POST" && $USER) { $choice = mysql_real_escape_string(htmlspecialchars($_POST["choice"])); if ($USER && $choice != "" && $choice < 256 && $choice == floor($choice)){ $res = sql_query("SELECT id FROM polls ORDER BY added D
-
I know, it's a weird thing,but the hosting is free (from a friend with a server home) and I don't use this thing just a few days a year....anyway, I,ll put my full code when I get home...maybe other users needs this thing too.
-
I don't have acces to cron jobs on the server where the website is hosted. I was thinking that I can check if the $row['date']+86400<time() or somthing similar will work but it seems that I can't figure it out.I forgot to mention, the xmas table looks like this: `id` int(11) NOT NULL AUTO_INCREMENT, `date` datetime NOT NULL, `gift` varchar(255) NOT NULL, I think I found a solution, I don't know if this is the best option but here is my new code: I changed the type of date in the database to DATE and here is my new code: $day = date('Y-m-d');$lastGift = $row['date'];$disabled = 0; if
-
Hi, I'm just started to learn PHP and now I encountered a problem. I'm trying to show a message every 24h but I can't figure it out. Here is my code: $link = mysql_connect('localhost', 'root', '');if (!$link) { die('Not connected : ' . mysql_error());}$db_selected = mysql_select_db('gifts', $link);if (!$db_selected) { die ('Can't use foo : ' . mysql_error());}$sel = mysql_query("SELECT * FROM xmas") or die(mysql_error()); $row = mysql_fetch_assoc($sel); $time_now = date('y-m-d h:i:s', time());//var_dump($time_now); if($time_now>$row['date']){ echo "here's your gift "; }else{
-
Try something like this: @font-face { font-family:'lottepaperfang'; src: url('./fonts/lottepaperfang.ttf');}@font-face { font-family:'ASTRONAU'; src: url('./fonts/ASTRONAU.ttf');}@font-face { font-family:'MarketDeco'; src: url('./fonts/Market_Deco.ttf');} My ttf files are saved in site_directory/fonts
-
I don't know about your php code, but your HTML code had a lot of errors. Here is the corrected HTML code: <!DOCTYPE html><html><head> <title>Page Title</title> <meta charset="UTF-8"> </head><body> <form action="resultaat.php" method="post"> <table> <tr> <td>getal 1:</td><td> <input type="text" name="getal_1"></td> </tr> <tr> <td>bewerking (+-/*)</td><td> <input type="text" name="bewerking"></td> </tr> <tr> <td>getal 2:
-
Java and cmd "Could not find or load main class"
JustMike replied to JustMike's topic in Java/JSP/J2EE
The path and the classpath are set, but still doesn't work. I have tried with NetBeans but the problem is still there.... Thanks for your help, I will continue to search for a solution and when I will find one I will post it here. ___________ Edit: I found the error, in the enviromental variables (Stsrem Properties>Advanced tab) there was another path set (something about nvidia) in System variables windows, I just deleted that and now I can run the files after I compile. -
Java and cmd "Could not find or load main class"
JustMike replied to JustMike's topic in Java/JSP/J2EE
I uninstalled java from Control Panel > Programs and Features and installed it again, but I still have the same problem. I checked, and there isn't any other java version. About the drives, I have the C: drive with the operating system (java is installed in Program Files folder) and I have the H: drive with my java files saved in a folder. -
Java and cmd "Could not find or load main class"
JustMike replied to JustMike's topic in Java/JSP/J2EE
Yes, the class name inside .java file is exactly the same. The downloaded and installed file it is this one jdk-7u45-windows-i586 This is what I get if I enter java -version: java version "1.7.0_45" Java SE Runtime Environment (build_1.7.0_45-b18) Java HotSpot Client VM (build 24.45-b08, mixed mode, sharing) -
Java and cmd "Could not find or load main class"
JustMike replied to JustMike's topic in Java/JSP/J2EE
I am using a pc with windows 7 (32 bit). Yes, the class name it is the same with the file name and I use the exact capitalization. This is a picture with my command prompt after I write javac and java commands: -
Java and cmd "Could not find or load main class"
JustMike replied to JustMike's topic in Java/JSP/J2EE
Still doesn't work... The javac command works, but when I try the java command I have the same Problem: "Error: Could not find or load main class FirstClass" -
Java and cmd "Could not find or load main class"
JustMike replied to JustMike's topic in Java/JSP/J2EE
Yes, the javac command seems to be working, but when I try java FirstClass it gives me that error. The file name is FirstClass.java. The file contains the following code: class FirstClass{ public static void main(String args[]) {/* for (int i=4;i<=20;i++) if ((prim(i)==true) &&(prim(i-2))==true) System.out.println(i); int g = Integer.parseInt(args[0]); if(div(g) == g){ System.out.println("Numarul este perfect"); }else if(div(g) > g){ System.out.println("Numarul este supralicitat"); }else{ System.out.println("Numarul este sublicitat"); } //System.out.println( -
Hi, I'm a beginner in Java. I have the following problem: "Error: Could not find or load main class FirstClass" I have done the following things in cmd: h:cd h:My Namejavac FirstClass.javajava FirstClass after the last command I get this error:"Error: Could not find or load main class FirstClass". I have the Java SE Developer Kit 7u45 from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html How can I solve this? What I'm missing? Thanks in advance for your help!
-
Now looks even better, Thank you dsonesuk! Thank you for the info davej!
- 25 replies
-
- position
- footer clear
-
(and 1 more)
Tagged with:
-
Yes, it's working with the border: none; for the images. Thank you!
- 25 replies
-
- position
- footer clear
-
(and 1 more)
Tagged with:
-
Yes, in IE the logo and the ad have a blue border and the outline doesn't show, but in Firefox, Opera and Chrome works great. Right now I'm searching a solution for the border and for the outline.
- 25 replies
-
- position
- footer clear
-
(and 1 more)
Tagged with: