Jump to:

2011 Posts in 1436 Topics by 620 members

Form Questions

SilverStripe Forums » Form Questions » Outputting external php into Silverstripe

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1097 Views
  • Victor
    Community Member
    128 Posts

    Outputting external php into Silverstripe Link to this post

    I have a php script which goes to database created by SilverStripe, f.e.:


    // database info

    $query ="SELECT * FROM StaffPage WHERE `lastname` LIKE '$_POST[last_name]%'";

    $result = mysql_query($query) or die("Could not execute query");
    if (mysql_num_rows($result)==0 ) {print("Not found "); return;

    while($row = mysql_fetch_array($result)) {
    echo $row[lastname].", ".$row[lfirstname];

    Now I want to put on some page form which is

    <form action='./dosearch.php'>
    <input type='text' name='last_name'>
    <input type='submit'>

    I surely can do it via iframes but it has its drawbacks. What is the recommended approach? How to accommodate/modify such script

    Thank you in advance. Victor

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.