User Profile

Collapse

Profile Sidebar

Collapse
Yousef Altaf
Yousef Altaf
Last Activity: Oct 1 '15, 02:50 PM
Joined: Jun 26 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Yousef Altaf
    started a topic return selected field for drop down list
    in PHP

    return selected field for drop down list

    I want if the user clicks submit to return the the selected value when the form reloads

    that what I try and no luck

    Code:
        <?php
        $getData = $db->prepare("SELECT * FROM first_university_degree_list");
        if ($getData->execute()) {
        $res = $getData->get_result();
        while ($data = $res->fetch_array()) {
        ?>
        <option value="<?php
    ...
    See more | Go to post

  • validate my form and header to another success page

    I am trying to validate my form fields and redirect the user to success page

    so this is the PHP code

    Code:
    if (empty($_POST['experiences'])) {
            $error['experiencesErr'] = "Experiences Required";
        } else {
            $experiences = check_input($_POST['experiences']);
            if (!preg_match("/^[0-9_a-zA-Z ]*$/", $experiences)) {
                $error['experiencesErr']
    ...
    See more | Go to post

  • Using php with javascript to save my google map into database

    I am trying to use PHP with Google map JavaScript this is my JavaScript code I have with the PHP the file name is face.php

    Code:
    <?php if(isset($_GET['p'])){$p=$_GET['p'];} ?>
    <!DOCTYPE html >
    
        <head>
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
        <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    ...
    See more | Go to post

  • Yousef Altaf
    replied to share products on Facebook
    in PHP
    OK I should answer this now so anybody has the same problem should take care about this
    in my URL that I am trying to get
    it should look like this
    Code:
    https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fnadim.org/new2/index.php?pid=v4&prodid=136&cat=1
    the all problem was this
    Code:
    &
    when I replaced with this
    Code:
    &amp;
    everything worked fine for me

    thanks and regards for all.
    Youse...
    See more | Go to post

    Leave a comment:


  • center the map on marker key on google maps api 3

    Hi all I am working on google map api-3 and I have two interface one is inserting data to my database and second getting the data on my site from my database now everything is working fine I insert the data to my databse and getting it but here is the problem I need to center the map on the marker key on the map

    here is my code

    to insert the data

    php code

    Code:
    <?php
    // Gets data from
    ...
    See more | Go to post

  • vspiridonov can you please send me an exsample on what you are saying
    See more | Go to post

    Leave a comment:


  • Yousef Altaf
    started a topic uploading multi-images without name duplication
    in PHP

    uploading multi-images without name duplication

    I am trying to upload multi-images I am using this script everything is fine and the images uploaded successfully the problem here is I don't want to duplicate the images name so I used this script to avoid this but no luck
    any idea

    this is my code

    Code:
    <?php
    if(isset($_POST['submit'])){
    $target = '../images/Projects/';
    	$num=1;
    	$projectID=$p;
        foreach ($_FILES["img"]["error"]
    ...
    See more | Go to post

  • Yousef Altaf
    started a topic share products on Facebook
    in PHP

    share products on Facebook

    I am trying to share my products image on Facebook but somethings gos wrong with the URL of the products I used this code on the header of the page

    Code:
    (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
        fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'faceboo
    ...
    See more | Go to post

  • Yousef Altaf
    started a topic only the first character goes to my db
    in PHP

    only the first character goes to my db

    I am trying to add this image name into my db but it just takes the first character of the name.
    like if the image named JACK it takes 'J' only to my table
    this is the var I am pointed to
    Code:
    $imageUp
    at line 14

    Code:
    $uploadsDirectory = 'includes/adsImages/';
    		$fieldname = 'image';
    		$errors = array(
    			1 => 'php.ini max file size exceeded', 
                2 => 'html form max file size exceeded',
    ...
    See more | Go to post

  • ya I did and now I don't get the notes but also I don't get my message that the file of the same name has been uploaded can you please write it down for me how it can be... and also I don't get the other validations like the file size please check my code again...
    Thanks
    See more | Go to post

    Leave a comment:


  • uploading image (same name) ignores error message, shows "Notice: Undefined variable:

    hay I have this code to upload images it works OK bu there is 2 things not working
    1- when the image has the same name it doesn't display the message "A file of the same name already exists" it just give me this Notice "Notice: Undefined variable: success in C:\wamp\www\joo n\xxxxx\xxxxx\x xxxx.php on line 108" why.
    2- the same for this big file size it don't give proper message as "$file is either too big or...
    See more | Go to post

  • Yousef Altaf
    started a topic send users activation Email for the new accounts
    in PHP

    send users activation Email for the new accounts

    I have this code (it's a form which will sign up new users and send them an email to active they account).

    Code:
    <?php
            if(isset($_POST['submited'])) {
                $msg="";
    
                $RFname = clean_text($_POST['RFname']);
                $RLname = clean_text($_POST['RLname']);
                $USERname = clean_text($_POST['UserName']);
                $USERpassword = $_POST['UserPass'];
    ...
    See more | Go to post

  • Rabbit sorry I didn't get your point can you please show me an example.

    1- when the user search for a word and the found is 0 it takes him to includes and includes has a new form that has the value of "SearchAdv" on the input text.

    2- what do you mean with pass the values it is already on the same page.

    please need an example on this is you can.
    See more | Go to post

    Leave a comment:


  • OK, if I am in your place I would say the same.

    this is the first form that in the header of the page which search my titles.
    Code:
    <form action="index.php?cat=search_results&learn_id=1" method="post">
          <div id="topSearchBodyStyle">
            <input type="text" name="search" class="topSearchTextBackground" />
          </div>
    ...
    See more | Go to post

    Leave a comment:


  • Rabbit it's not it's the same question but I just updated the code for better idea anyway it's the same. did you see my attachments?
    See more | Go to post

    Leave a comment:


  • How are you dear Rabbit, thank you that you replayed to my question.
    If you are asking about this
    Code:
    include "searchPageAdvanced.php";
    by your question "Why send them to another page?" so I have tried many times to let the all code in one page.

    OK look again to my updated post I have made a changes to it now it works and I attached 2 files.php see them too.

    I have now new problem that when I make...
    See more | Go to post

    Leave a comment:


  • adjusting my code to take the user to the search results if there is any

    I have made this page to search my site but here in my MySQLi I am looking in the column title so if the user didn't find what he looking for I will include a advanced search which will look into the content of the tutorials so the user can get any results.

    this the complete code of my page.

    Code:
    <?php 
    	
    	if (isset($_POST['search'])){ 
    	$getSearch = clean_text($_POST['search']);
    	$connectToDb
    ...
    See more | Go to post

  • Yousef Altaf
    replied to search with php on my site problem
    in PHP
    Thanks a lot for you brother Atli happy that I got your replay first I have fixed my Mysqli query from two days but I didn't take care about addslashes and magic_quotes Thanks a lot for the information I have updated my code to be some thing like that.

    Code:
    $getSearch = clean_text($_POST['search']);
    and the function will be this.

    Code:
    function clean_text($text='')
    
    			{
    				$text=trim($text);
    ...
    See more | Go to post

    Leave a comment:


  • Yousef Altaf
    started a topic search with php on my site problem
    in PHP

    search with php on my site problem

    hi every one I have a problem with my search on my site I don't understand why it give me this error

    this is my form code

    Code:
    <form action="index.php?cat=search_results&learn_id=1" method="post">
          <div id="topSearchBodyStyle">
            <input type="text" name="search" class="topSearchTextBackground" />
          </div>
    ...
    See more | Go to post

  • Yes this is right you got me, many thanks brother should say the last part of it that the Spry javascript that usually appears at the foot of the page will move it within the loop itself to be something like this

    Code:
    <div id="<?php echo "CollapsiblePanel".$curentID; ?>" class="CollapsiblePanel">
         <div class="CollapsiblePanelTab" tabindex="0">Comments</div>
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...