|
|
please check the code and tell me if there is any problem.as far as i know there is some problem with the text data not being sent toh php file.
<html>
<head>
<title>Ajax Search Box using PHP and MySQL</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="typeahead.min.js"></script>
<script>
$(document).ready(function(){
$('input.typeahead').typeahead({
name: 'typeahead',
remote:'search.php?key=%QUERY',
limit : 10
});
});
</script>
.bs-example{
font-family: sans-serif;
position: relative;
margin: 50px;
}
.typeahead, .tt-query, .tt-hint {
border: 2px solid #CCCCCC;
border-radius: 8px;
font-size: 24px;
height: 30px;
line-height: 30px;
outline: medium none;
padding: 8px 12px;
width: 396px;
}
.typeahead {
background-color: #FFFFFF;
}
.typeahead:focus {
border: 2px solid #0097CF;
}
.tt-query {
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
}
.tt-hint {
color: #999999;
}
.tt-dropdown-menu {
background-color: #FFFFFF;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 8px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
margin-top: 12px;
padding: 8px 0;
width: 422px;
}
.tt-suggestion {
font-size: 24px;
line-height: 24px;
padding: 3px 20px;
}
.tt-suggestion.tt-is-under-cursor {
background-color: #0097CF;
color: #FFFFFF;
}
.tt-suggestion p {
margin: 0;
}
</head>
<body>
Ajax Search Box using Node and MySQL Codeforgeek Tutorial
<button type="button" class="btn btn-primary btn-lg">Visit Tutorial</button>
<input type="text" name="typeahead" class="typeahead tt-query" autocomplete="off" spellcheck="false" placeholder="Type your Query">
</body>
</html>
|
|
|
|
|
Don't expect other people to run and debug your code for you. We're glad to help if you will narrow down the issue and ask a specific question.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
im trying to get one response from a form inside a aspx web page but i only get the same page without styles.
Whats is my error? Exist other alternative?
URL WEB SITE
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://the web site/');
curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/32.0.1700.107 Chrome/32.0.1700.107 Safari/537.36');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "ddlCiudad=05001&ddlEntidadEspecialidad=121-True-3110-05001-Juzgado de Circuito-Familia&rblConsulta=1&a5kuj4redmp05gddr1lfjij5=05001316000420140143000");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIESESSION, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '');
$answer = curl_exec($ch);
if (curl_error($ch)) {
echo curl_error($ch);
}
echo $answer;
curl_setopt($ch, CURLOPT_URL, 'http://the web site/');
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, "");
$answer = curl_exec($ch);
if (curl_error($ch)) {
echo curl_error($ch);
}
echo $answer;
?>
CASE NUMBER: 05001316000420140143000
Now, i need this answer:
URL IMAGE RESPONSE
Thanks!
|
|
|
|
|
Hi,
I have a strange behaviour in a php script.
1. I list all files of a directry and it's subdirectories in an array.
2. I convert all names in utf-8 and put them in a second array.
3. I serialize and save both arrays in binary files.
4. I rename all files by stripping accents, spaces and all non-ASCCI characters (normalized names).
5. I unserialize the binary files in new arrays and then ...
all that I get is only the normalized names in each table.
I can't understand how this happens and how to get around.
Note: If I exit the script after 3. and rename the binary files, everything works fine in point 5. by unserializing these renamed binary files.
I would greatly appreciate any suggestion.
Thx for your time.
Michel.
|
|
|
|
|
Michel PIERRE wrote: I would greatly appreciate any suggestion. Show the code that is not working and indicate where the error occurs.
|
|
|
|
|
Hi Richard,
Thank's for your interest.
Unfortunatly, I have to leave for now.
As there's a big peace of code, I'll simplify it and post it as soon as I can.
Best regards,
Michel 
|
|
|
|
|
Hi Richard,
I think I've found a walk-around:
As at the begining I only the names in the differents formats to store in my database, I'll just get them and I'll renames the files after closing the DB.
Hope this will work. But I'm still obseded by this strange behaviour.
Thanks and cheers.
Michel
|
|
|
|
|
Hi, I'm a total newbie to JavaScript, Ajax and PHP, so please excuse any stupid question I might ask.
So, I'd like to use a lazy loading TreeView which gets it's data from a database via PHP. I found a JavaScript control to use and an example to try out, and now I have a question.
To lazy load the data for the expanded tree node I need to fire an Ajax request to a PHP file which gives me the answer as a JSON stream. In the example I'm trying out this PHP file only delivers one string (with 'echo'), but what do I have to do if I need to loop through a database recordset. Can I 'echo' every partial answer to my lazy loading treeview as I get it from the database or do I need to collect the complete answer inside the PHP file in a string variable and send it only when it's complete?
I hope you understand my question.
Thanks for any answer or advice in advance.
|
|
|
|
|
No there is no real difference between lots of little echo es and one big one with the same content. Depending on your server and its buffering policy, you might find little ones a bit faster.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
|
|
Hello,
I am a beginner in php and I'd see a picture on the same page by validating certain criteria by pressing a button.
Here the form that I created and I would like the table appears below when I click on the button displaying statistics .
|
|
|
|
|
hint:
1.load the statistics and use css set display:none;button on click,
(jquery) $("id of the table").show something like that
-or-
(javascript) document.GetElementById('id').style.display = block;
2.use javascript / jquery as above, and google for ajax
|
|
|
|
|
Hi,
I am getting the following error in my index.php:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/meskholdings/meskholdings.com/jobs/index.php:1) in /home/meskholdings/meskholdings.com/jobs/index.php on line 3
I checked my code and my session_start() is the first line. cany anyone help please...
this is my index.php:
<?php
include("php_header.php");
include("connect2db.php");<br />
?>
<!DOCTYPE html>
<html lang="en">
<head>
and this is my php_header.php:
<?php
ob_start();
if(!isset($_SESSION)) { session_start(); }
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL & ~E_NOTICE);
?>
Technology News @ www.JassimRahma.com
|
|
|
|
|
Look out for any whitespace, including newlines.
<?php
include("php_header.php");
include("connect2db.php");
?><!DOCTYPE html>
|
|
|
|
|
|
Hello
I need a simple code that I can give a URL of image to this code and this code save the image in host.
Regards
|
|
|
|
|
Please don't post the same question in multiple places.
Also posted in QA: How can Save Image with PHP?[^]
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
copy_player_image($url,$destinationurl);
copy_player_image($imgurl,$destinationurl){
$image = file_get_contents($imgurl);
$imgpath = 'images/xyz.jpg";
$fullpath = $_SERVER['DOCUMENT_ROOT'].$destinationurl;
if(!file_exists($fullpath)){
unlink($fullpath);
file_put_contents($fullpath, $imageurl);
}
return $imgpath;
}
|
|
|
|
|
I'm stuck with this problem, any help will be appreciated.
I have a web service, it requires authentication to call functions but I couldn't authenticate.
The function XML is like this:
<s11:Envelope xmlns:s11='http://schemas.xmlsoap.org/soap/envelope/'>
<s11:Header>
<ns1:AuthHeader xmlns:ns1='MOD'>
<ns1:Channel>?XXX?</ns1:Channel>
<ns1:Username>?XXX?</ns1:Username>
<ns1:Password>?XXX?</ns1:Password>
</ns1:AuthHeader>
</s11:Header>
<s11:Body>
<ns1:GetBankList xmlns:ns1='MOD' />
</s11:Body>
</s11:Envelope>
my connection codes are:
$baglanti = new :confused:SoapClient("https://galaksi.turknippon.com/appservice/mod.asmx?wsdl");
$parm = array();
$parm[] = new SoapVar('channelcode', XSD_STRING, null, null, 'Channel' );
$parm[] = new SoapVar('myusername', XSD_STRING, null, null, 'Username' );
$parm[] = new SoapVar('mypassword', XSD_STRING, null, null, 'Password' );
$Adres = "https://galaksi.turknippon.com/appservice/";
$Baslik = new SoapHeader($Adres, "AuthHeader",new SoapVar($parm, SOAP_ENC_OBJECT));
$baglanti->__setSoapHeaders(array($Baslik));
$sonuc = $baglanti->AuthHeader(new SoapVar($parm, SOAP_ENC_OBJECT));
print_r ($sonuc);
Here is a stack trace:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object. at AppServiceLibrary.AuthHeader.Validate(AuthHeader& credential) in xxxx\Galaxy\Galaxy\AppServiceLibrary\AuthHeader.cs:line 132 at xxxx.AppService.MODService.GetBankList() in xxxx\AppService\mod.asmx.cs:line 1148 --- End of inner exception stack trace --- –
|
|
|
|
|
Please do not post the same question in multiple forums.
|
|
|
|
|
Hello
I write a Statistics and I have a problem. I attached the files.
the zip file included 4 file.
1. t.php: included only a link
2. index.php: with scrpit refer t.php to emt.php.
3. emt.php : insert refered page in test.txt.
so when you open t.php an clink on link the t.php inserted to test.txt and have no problem.
but I want when other page link to t.php so the refer page inserted to test.txt.
you can download file from below link:
https://encodable.com/uploaddemo/files/am.zip[^]
|
|
|
|
|
Please include your code in your question. I'm not inclined to download anything in order to answer a question and that's probably also true for anyone else here.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
index.php:
var test=document.referrer;
document.write("<script type='text/javascript' src='<a href="http://localhost/am/emt.php?input=">http://localhost/am/emt.php?input=</a>" + test + "'></sc" + "ript>");
t.php:
<a href="index.php">set</a>
emt.php:
$last=$_GET['input'];
$bazdid=$last."\r\n";
$file=fopen("test.txt",a);
$rit=fwrite($file,$bazdid."\r\n");
fclose($file);
modified 30-Apr-15 18:12pm.
|
|
|
|