john_jack
-
Posts
77 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by john_jack
-
-
if the image is still not showing up but other info like the adress and such is showing , maybe the problem is in the image path in your database .
-check if the car directory exists
-make sure that the images you are trying to display are in car directory
-check the images paths in your database .
PS open the developer tools on your browser and check the path in the <img> tag
-
try to prevent default submit :
use
event.preventDefault();
before the tinyMCE.get('mytextarea').focus() .
works for me
-
First of all take a look here http://www.w3schools.com/jquery/jquery_selectors.asp
i tried this and it works .
<html> <head> <style> .nav{ display: block; width: 10%; float: left; margin-left: 6.25%; margin-top:-10px; opacity: 0; } .vis{ opacity: 1; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> </head> <div style="width:100%"> <img src="skit/images/example/002.jpg" class="nav" id="img1"/> <br /> </div> <div id="of"></div> <script> jQuery(document).ready(function () { var navOffset = jQuery("#of").offset().top; jQuery(window).scroll(function () { var scrollPos = jQuery(window).scrollTop(); //alert(scrollPos); $("#of").html("nav :" + navOffset +"scroll :"+scrollPos); if (scrollPos >= navOffset) { jQuery("#img1").addClass("vis"); jQuery("#img1").removeClass("nav"); } else { jQuery("#img1").removeClass("vis"); jQuery("#img1").addClass("nav"); } }); }); </script> okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok</br>okok
-
here is an eg :
<img src="./01.png" id='img1'/> <img src="./02.png" id='img2'/> <script> var x=1; var myVar = setInterval(myTimer, 1000); function myTimer() { if(x%2==0){ document.getElementById("img1").style.display = "none"; document.getElementById("img2").style.display = "block"; x=1; } else{ document.getElementById("img2").style.display = "none"; document.getElementById("img1").style.display = "block"; x=2; } } </script>
all you have to do is get some images and set the SRC path to the right location .
-
create your editor as web application using a browser (you can use html for the UI and can execute JS).
-
i suppose you are typing html in the the text fileds :
$title=$_POST['title'];$body=$_POST['body'];use this instead to avoid errors even thoe you didnt mention an error !$title=addslashes($_POST['title']);$body=addslashes($_POST['body']);as for the large size post problem try one of these 2 solutions1) go to php.ini
post_max_size=20M
upload_max_filesize=20M2) use an .htaccess / httpd.conf / virtualhost include
php_value post_max_size 20M
php_value upload_max_filesize 20M- 1
-
you need to put the " Echo" part inside the while loop .
<?php
$con=new mysqli("localhost","root","", "testdb");$sql="SELECT * FROM cms";$run=mysqli_query($con, $sql);while($row=mysqli_fetch_array($run)) {$title=$row['title'];$body=$row['body'];}echo "<h1> $title</h1<p>$body</p>";?>replace it with this :
<?php $con=new mysqli("localhost","root","", "testdb"); $sql="SELECT * FROM cms"; $run=mysqli_query($con, $sql); while($row=mysqli_fetch_array($run)) { $title=$row['title']; $body=$row['body']; echo " <h1> $title</h1 <p>$body</p> "; } ?>
- 1
-
here is a simple code to help you understand .
Unit price :<input type="text" id="unit_price" /><br /> Quantity :<input type="text" id="quantity" /><br /> <button id="b_total" onclick="calculate();">calculate</button><div id="result"></div> <script> function calculate() { var price_unit=document.getElementById("unit_price").value; var quantity=document.getElementById("quantity").value; document.getElementById("result").innerHTML = quantity * price_unit +" $"; } </script>
all you need is set your own values (if you are retriving data via Php from a database or whatever) + calculate the tax and you ae good to go
-
take a look at this http://www.w3schools.com/js/js_switch.asp
-
for the signup :
usualy theres a basic html form that sends the data to a server side script Php for eg.the php file checks the validity of the data sent via the form if everything is ok you insert the data in a database for eg "a table called user" via SQL query .
check this http://www.w3schools.com/Php/php_forms.asp
for the sign in :
a basic html for login and password once submited transmits the data to a php file that checks if the user is registred in the database if its ok you redirect him to a page of your choice . you will have to use sessions http://www.w3schools.com/php/php_sessions.asp to keep track of the user and what he can access or not
-
yes Correct ,usualy theres only 1 variable on the left of "=" .unless theres more '=' signs like
$a=$a+$b=$c+$d;
-
not sure what you are saying but "="
and i tried this code :
<?php $a=1; $b=2; $c=3; $d=4; $a+$b=$c+$d; echo"a = $a b= $b c= $c d= $d"; ?>
the result was a = 1 b= 7 c= 3 d= 4 .
as you can see the $a stayed the same no value assigned to it after the $a+$b=$c+$d; only $b gets a new value .
hope this explains it
-
the equal sign "=" doesnt stand for egality it means affectation ,meaning what is on the right side of the = sign endup on the left .
so $y = $x + $y means calculate the value of X+Y and store it in Y .
-
Oh man i ,i was about to tell you still didnt work!! and you posted the thing about the encoding and that was it man ; UTF8 ftw
thanks a lot for your help it works like a charme now .
-
-
i folowed the tutorial as it was at first but didnt work ,didnt create the database .so i though maybe if i created it it will resolve the issue but sadly no .
i used the sql provided in create_customer.js to create the table .
when i use a php file to retrive data and make the result as json it works .
i know these kinda tutorials are usualy to be 100% working ,but idk man ! thats why i asked if theres a way to get more details about the error somehow :s
anything else i can provide you that might help?
-
if wha you want is clean string no \ then use this :
$url="\sd\s\qq\\\\\\"; echo $url."<br>"; do{ $cleanurl=$url; $url=stripslashes($url); }while($cleanurl!=$url); echo $url."<br>";
-
if you could post the code you have 'if you have one ',we might be able to help .otherwise you need to learn some php/sql basics
-
you can think of sessions as a global variable declared on the server side ,you can get access to session variable from any php file where session_start is mentioned
-
you should change :
this "echo "<img src="car/.$images." height="100" title="$title" alt="car" />";//this is going wrong"
to echo "<img src='car/".$images." ' height='100' title=' ".$title." ' alt='car' />";
Good luck
-
i created it teh databse directly from mysql coz the create_customers not working .
the point is my database is created and populated .yet not retriving data.
thanks
-
have you tried using opendir and readdir http://php.net/manual/en/function.opendir.php .i used it a while ago it works like a charm.
-
how bout http://php.net/manual/en/function.addslashes.php and http://php.net/manual/en/function.stripslashes.php
they might do it for you!
-
i see that you got it to work! Goodjob
you can use :
header('Location: http://www.example.com/'); exit;
intead of
echo "Thank you for contacting us! Please use your browser's back button to return to the previous page.";
so the user gets redirected automaticly .
Handle form with AJAX & PHP
in PHP
Posted · Edited by john_jack
the name you need to use on php side is $_post["firstname"] instead of $_post["first"].