السلام عليكم ورحمة الله وبركاته
ارجو منكم الساعده اريد عمل بحث بواسطة كلمة والمشكله هي لم اعرف كيفية مقارنة الكلمة بنص كامل اي هل الكلمة ضمن النص ام لا
وشكرا
السلام عليكم ورحمة الله وبركاته
ارجو منكم الساعده اريد عمل بحث بواسطة كلمة والمشكله هي لم اعرف كيفية مقارنة الكلمة بنص كامل اي هل الكلمة ضمن النص ام لا
وشكرا
وضح ما هي اللغة المستخدمة
هل html
ام php
هل محتويات الموقع محفوظة في قاعدة بيانات ام انها ساكنة ؟
تم تعديل هذه المشاركة بواسطة pepo_007 في 21 يوليو 2012 في 02:39
pepo_007 كتب:وضح ما هي اللغة المستخدمة
هل html
ام php
هل محتويات الموقع محفوظة في قاعدة بيانات ام انها ساكنة ؟
اللغة المستخدمه هي php والبيانات محفوظة في القاعده
Select * from names where fname like %a%;
وهذا كود find and replace
<?php
$offset=0;
if(isset($_POST['text'])&&isset($_POST['searchfor'])&&isset($_POST['replacewith']))
{
$text=$_POST['text'];
$search=$_POST['searchfor'];
$replace=$_POST['replacewith'];
$serach_lenght=strlen($search);
if(!empty($text)&&!empty($search)&&!empty($replac))
{
//strpos (text we search in , word, strating position of searching)this function is returning the position of the word we are searching for
while($strpos=strpos($text,$search,$offset))
{
$offset=$strpos + $serach_lenght;
$text=substr_replace($text,$replace,$strpos,$serach_lenght);
}
}
else
{
echo "Please Fill-in All The Feilds";
}
}
?>
<form action="index.php" method="post">
<textarea name="text" rows="6" cols="30"><?php if(!empty($text)){echo $text;} ?></textarea><br><br>
Search for:<br><input type="text" name="searchfor"><br>
Replace with:</br><input type="text" name="replacewith"><br><br>
<input type="submit" value="Find and Replace">
</form>If your actions inspire others to dream more, learn more, do more and become more, you are a leader
Best Regards
Feras Abualrub
المتواجدون خلال آخر دقيقتين · يتحدّث كل ٣٠ ثانية
جارٍ التحقق من المتواجدين…