Jump to content

joseph

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Posts posted by joseph

  1. I'm testing my site locally on a wamp server.

     

    I have a links.php having:

    <?php
    function topnav() {
    echo'
    <a href="...."></a>
    }
    ';
    ?>

     

    It does not seem to work if I call it in index.php:

    <?php topnav(); ?>

     

    I want to call the topnav() in index.php so that I don't to edit the links everytime I add a new webpage.

     

    @jason_kraft: I also tried <?php include("filename.php"); ?> however it gives me an error

    Warning: include() [function.include]: URL file-access is disabled in the server configuration...

     

    Does javascript has something like this? I might need it in javascript codes because my website is currently in .html extensions.

  2. Thanks Ben. I still cannot create the S# field name I enlclosed them in backticks like `S#` or (`S#`)

     

    SQL query:
    
    CREATE TABLE EMPLOYEE(
    `E#` NUMBER( 5 ) NOT NULL ,
    EFNAME VARCHAR( 20 ) ,
    ELNAME VARCHAR( 20 )
    )
    
    MySQL said: Documentation
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NUMBER(5) NOT NULL,
    EFNAME VARCHAR(20),
    ELNAME VARCHAR(20),
    ' at line 2 
    

     

    I think Tyche is right, maybe it is possible with other SQL applications like SQL server?

  3. Hello, how do we make a title like "My Website" appear in search engines (such as google) as title? Should I just add a meta descriptions and keywords? or is it the header title tags that makes it work?

     

    For example:

     

    1. My Website <- How to make this possible?

        This site is .......

    2. Amazon.com

        Books, etc......

     

    Thank you.

  4. I have search about htmlspecialchars_decode:

    http://www.phpfreaks.com/phpmanual/page/function.htmlspecialchars-decode.html

     

    But not sure how to implement them on sendmail functions.

     

    	$subject = $params['subject'];
    	$body = $params['body'];
    
    	$replacements = array();
    	$replacements['{sitename}'] = $mosConfig_sitename;
    	$replacements['{name}'] = $invitor;
    	foreach ( $replacements as $search => $replace ) {
    		$subject = str_replace( $search, $replace, $subject );
    		$body = str_replace( $search, $replace, $body );
    	}		
    
    	$mail = mosCreateMail( $mosConfig_mailfrom, $mosConfig_fromname, $subject, $body );
    	$mail->AddAddress( $this->invitee_email );
    	$mail->IsHTML( false );
    	       
    
    	if ( !$mail->Send() ) {
    		$this->_error = 'mosMail error!';
    		return false;
    	}
    

     

    The mails I received are having <br /> tags but html are actually being decoded. What I want is to decode those <br /> tags and make them disappear but maintains having the line space when I received my mails.

     

    I'm thinking that I might need the strip tags php function? But how do I implement them on this $mail?

     

    Thanks.

  5. In PhpMyAdmin we have these 3 export options to choose from: 1. Insert 2. Update and 3. Replace. Sound very easy to understand but how is it done exactly to the tables having an existing data?

     

    For sure, I know the most common when we use INSERT Export type to an existing database, it will insert it all w/o errors that is if the tables being inserted to the new database does not have any identical table_names.

     

    How about for the UPDATE and REPLACE? How will it react when we insert them to the new database if there are identical table_names?  ???

     

     

  6. I don't know if this is already posted or not, not sure how/what term to search for.

     

    I'm trying to make the root index.php to automatically redirect to the page if the user browsing the index.php is from a specified country.

     

    Like for example:

    US user browses index.php -> automatically redirected to /en/index.php

    India user browses index.php -> automatically redirected to /in/index.hp

    China user browses index.php -> automatically redirected to /cn/index.php

     

    May I know how to do this?  :)

  7. Maybe your mail client has specified it as spam? - Not sure. But it happened to me last time when I send it every minute to test my email form, then yahoo mail thought I was spamming so they blocked all emails coming from that site - I guess.

  8. Hello,

     

    I'm not sure whether this has/will have anything to do with PHP.

     

    I'm trying to wrap a certain website and then make it load to the center position automatically when the page is loaded. I tried anchor but it doesn't seem to work. And the main menu of that website seems to align itself according to the width specified - but I need to the iframe to be 300 pixels.

     

    <div align="center"><iframe src="www.phpfreaks.com#Summary" width="300"></iframe></div>

     

    Or how to make them position to where their last scroll position is the next time when they click the links inside the iframe?

     

    Thanks

  9. I've been testing my feedback form sent to my yahoo mail. It was working fine at first, but after receiving more than 10 emails then I can't seem to receive anymore.  ???

     

    BTW, I tried testing two recipients separating them with comma. But when I check my email accounts, only 1 received the feedback. Is there anything wrong with the source codes?

     

    $recipient = "dummy@yahoo.com, dummy2@yahoo.com";
    $subject = "Subject here";
    $mailheaders = "From: My Form <name@mail.com> \r\n";
    $mailheaders .= "Reply-To: " .$_POST["email"];
    

     

    Thanks.

  10. Hello PhpFreaks,

     

    I hope this isn't double post since I already tried searching in the forums. I'm trying to get the ip address of the user who sends the feedback form and display it in the email for me to see. Could somebody please help me what codes to do this?

     

    I have successfully made a simple feedback form feedback.html and sendmail.php

     

    Thanks  :)

     

    BTW, this is my first post!

  11. I got it now:  ;D

    From php.net's FAQ, http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath

    The php.ini - recommended file is like a quick-start configuration -- just overwrite the original php.ini file with this one.

    You can use any text editor to create a php file. Just make sure it has a .php file extension, and that it is in Apache's public_html directory.
  12. We also need to make a version of php.ini available.  To do this, first add you php directory to your Windows PATH [color=red](Where is this windows path anyway?)[/color] Next, in the PHP installation directory, copy the php.ini - recommended file to php.ini [color=red](Did he mean that I should copy and paste that file into the same folder and just rename it to php.ini?)[/color].  After making these changes you must restart your apache server.

    Now we're ready to check that PHP is working. In the htdocs directory in your Apache installation, create a file called phpinfo.php containing the following lines

    <?php
    phpinfo();
    ?>
    [color=red]
    How do I create a php file? Should I use notepad to create one?[/color] Thanks.
  13. [quote author=Colleen78 link=topic=101542.msg406319#msg406319 date=1154322325]
    Would a script like PHPPROBID - http://www.phpprobid.com/ suffice?

    Or Softbiz Online Auction script. http://www.softbizscripts.com/auctions-script-features.php

    There's also AJ Auction - http://www.ajsquare.com/products/auction/

    There's many here, http://www.hotscripts.com/PHP/Scripts_and_Programs/Auctions/index.html?action=formsubmit&listing_sorting_order=member_rating&listing_sorting_direction=des
    [/quote]

    Hey... Thanks ;)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.