Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6922435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:24:20+00:00 2026-05-27T10:24:20+00:00

I’m beginer to web developing so maybe this is a so easy and stupid

  • 0

I’m beginer to web developing so maybe this is a so easy and stupid question from my side but I tring to find a way to solve this all day and please HELP.

I have a form:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body,td,th {
    font-family: Calibri;
}
.style1 {font-size: 24px};
-->
#wrapper {
    margin: 0 auto;
    width:600px;
    height:1000px;
    margin-top:50px; 
    background:url(bgMob.jpg);
    border:solid;
    border-color:#CCCCCC;
    }
#inside {
    width:920px;
    height:1500px;
    margin-left:30px;
    margin-right:30px;
    }
.style2 {color: #CC0000}
.style4 {color: #FF6600}
.style5 {color: #FF0000}
.styleField {
    border-radius:5px;
    border-width:thin;
    border-color:#CCCCCC;
    height:30px;
    font-family:Calibri;
    font-size:16px;
    }
.styleField:hover {
    background:#CC0000;
    font-style:normal;
    color:#FFFFFF;
    }
.styleButton {
    background:#EEEEEE;
    border-radius:5px;
    border-width:thin;
    border-color:#CCCCCC;
    height:30px;
    }
    .styleButton:hover {
    background:#CCCCCC;
    }
</style></head>

<body>

<div align="center" class="style1 style2"><span class="style5">creator</span><span class="style4"></span></div>
<div id="wrapper"><div id="inside">
    <form id="city" name="city" action="<?php echo $_POST["city"]; ?>" method="post">
    <label>CITY name :<br /> 
      <input name="city" type="text" class="styleField" size="50" />
    </label>
    <label>
    <input name="city" type="submit"  class="styleButton" value="Check!" />
    </label>
  </form>
  <form id="form1" name="form1" method="post" action="">
    <label>Enter the site URL:<br /> 
      <input name="textfield" type="text" class="styleField" size="50" />
    </label>
    <label>
    <input name="Submit" type="submit" class="styleButton" value="Check!" />
    </label>
  </form>
  <hr />
  <form id="form0" name="form0" method="post" action="">
    <label>Enter the  URL where is all deals:<br /> 
    <input name="textfield0" type="text" class="styleField" size="50" />
    </label>
    <label>
    <input name="Submit0" type="submit" class="styleButton" value="Check!" />
    </label>
  </form>
  <hr />
  <form id="form2" name="form2" method="post" action="">
    <label>
    Xpath location of links where is ALL deals<br />
    <input name="textfield2" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit2" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form3" name="form3" method="post" action="">
    <label>
    Xpath location of TITLE <br />
    <input name="textfield3" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit3" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form33" name="form33" method="post" action="">
    <label>
    Xpath location of SUB-TITLE <br />
    <input name="textfield33" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit33" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form4" name="form4" method="post" action="">
    <label>
    Xpath location of PRICE <br />
    <input name="textfield4" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit4" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form5" name="form5" method="post" action="">
    <label>
    Xpath location of Original PRICE <br />
    <input name="textfield5" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit5" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form6" name="form6" method="post" action="">
    <label>
    Xpath location of DISSCOUNT <br />
    <input name="textfield6" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit6" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form7" name="form7" method="post" action="">
    <label>
    Xpath location of MAP - latitude, longitude <br />
    <input name="textfield7" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit7" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form8" name="form8" method="post" action="">
    <label>
    Xpath location offer TIME <br />
    <input name="textfield8" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit8" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form9" name="form9" method="post" action="">
    <label>
    Xpath location of BUSINESS name <br />
    <input name="textfield9" type="text" class="styleField" size="50" />
    </label>
    <input name="Submit9" type="submit" class="styleButton" value="Check!" />
  </form>
  <hr />
  <form id="form10" name="form10" method="post" action="">
    <label>
      <div align="center">
        <input name="Submit10" type="submit" class="styleButton" value="Create a scraping file!" />
    </div>
    </label>
  </form>
  <hr />
</div>
</div>
</body>
</html>

and I have a second php file who i want to execute with jquery and based on entered xpath in form…

here is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Scraping - eKupon.ba</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

</head>

<body>



<?php

error_reporting(E_ALL);

require_once('../includes/php.scarping.php');





//Adresa sajta

$scrapeConf['homePage']             = 'http://www.ekupon.ba';



//Adresa gdje se nalaze sve ponude

$scrapeConf['mainURL']              = 'http://www.ekupon.ba/aktivne-ponude/';



//XPATH putanja do linkova od svake ponude ponaosob

$scrapeConf['PonudaLinkovi']        = "//div[@class='pdodatna-naslovbox']/a/@href";



//XPath Putanja do naslova ponude

$scrapeConf['PonudaNaslov']         = "//div[@id='naslovbox']/span[@class='naslov']";



//XPath Putanja do podnaslova ponude

$scrapeConf['PonudaPodnaslov']      = "//div[@id='naslovbox']/span[@class='podnaslov']";



//XPath Putanja do prve slike koju zelimo

$scrapeConf['PonudaSlika']          = "//*[@id='ponuda']//a/img/@src";



//XPath putanja do polja sa cijenom

$scrapeConf['PonudaCijena']         = "//*[@id='ponuda']//div[@class='cijena']";



//XPath putanja do polja sa orginalnom cijenom

$scrapeConf['PonudaOrgCijena']      = "//*[@id='podaci']//span";



//XPath putanja do polja sa orginalnom cijenom

$scrapeConf['PonudaPopust']         = "//table[@id='podaci']//tr[2]/td[2]/span";



//Xpath do dijela koji sadrzi ili <script> sa lat lng ili url sa lat|lng

$scrapeConf['PonudaLatLng']         = "//table[@id='lokacija']//td/script[2]";



//Xpath putanja do elementa koji sadrzi vrijeme do istka ponude

$scrapeConf['PonudaVaziDo']         = "//table[@class='sjena']//span[@class='sat']";



//Xpath putanja do dijela koji sadrzi ime firme (nije obavezno)

$scrapeConf['PonudaFirmaIme']       = "//table[@id='lokacija']//p/strong";



//Xpath putanja do dijela koji sadrzi adresu firme (nije obavezno)

$scrapeConf['PonudaFirmaAdresa']    = "";



//Xpath putanja do dijela koji sadrzi telefon  (nije obavezno)

$scrapeConf['PonudaFirmaTel']       = "";



//Xpath putanja do dijela koji sadrzi email  (nije obavezno)

$scrapeConf['PonudaFirmaMail']      = "";





//Uzmi sve ponude

$ponudeList = xpathPonude($scrapeConf);



//DODAVANJE PONUDA

foreach ($ponudeList as $key => $ponuda) {

    //OVDE obraditi varijable iz ponuda ako ima potrebe...

    $ponuda['naslov']    = str_replace(' -', '', $ponuda['naslov']);

        //sacuvaj sliku

        $imeSlike = date('YMDHM-') . $ponuda['lat'] .'.jpg';

        save_image($ponuda['slika'], '/home/pluspon/public_html/slike/'. $imeSlike);

        $ponuda['slika'] = $imeSlike;







    //  DO OVE LINIJE SVE PONUDE I VARIJABLE MORAJU BITI

    //  SREDJENE I SPREMNE ZA UPIS U BAZU

    print insertNew($ponuda['naslov'], $ponuda['podnaslov'], $ponuda['lat'], $ponuda['lng'], $ponuda['slika'], $ponuda['url'], $ponuda['popust'], $ponuda['vaziDo'], $ponuda['firma'], $ponuda['firmaadresa'], $ponuda['firmaemail'], $ponuda['firmatelefon'], $ponuda['firmaURL']);

}



//Debug vreme

print 'Vreme proteklo '. sk_genTime() .' sekundi';

?>

</body>

</html>

also what I want is when user type xpath in form and click on check then get a $result from php file and know is the xpath right or not. Offcource the result print right on the button. I know that can do it with ajax and jquery but I’m not very well in this so I also want to pay to someone who want to help me. And really sorry for my english but I’m working now on my engslih hard.

also I need to replace a text in apostrof (‘) with value from form…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:24:21+00:00Added an answer on May 27, 2026 at 10:24 am

    Add an onSubmit parameter to the form tag, which calls a JavaScript function. That JavaScript function should call the PHP script by using the JQuery post function, and passing it the form data. The success callback of the post function will receive the data returned by the PHP script, and you can put that anywhere on your calling page via the DOM.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.